6.0.0-beta1
7/24/25

[#5381] image_id < 10
Summary image_id < 10
Queue Ansel
Type Bug
State Resolved
Priority 1. Low
Owners chuck (at) horde (dot) org
Requester tinu (at) humbapa (dot) ch
Created 05/20/2007 (6640 days ago)
Due
Updated 06/14/2007 (6615 days ago)
Assigned 06/14/2007 (6615 days ago)
Resolved 06/14/2007 (6615 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
06/14/2007 03:26:17 PM tinu (at) humbapa (dot) ch Comment #9 Reply to this comment
I found this on http://www.php.net/substr :



"In PHP 5.2.2 (and probably 4.4.x) the behaviour of substr has changed 
for negative start index larger than the string length - now returning 
false in stead of the string itself. [...]"
06/14/2007 03:21:43 PM Chuck Hagenbuch Comment #8
Assigned to Chuck Hagenbuch
Taken from Jan Schneider
State ⇒ Resolved
Reply to this comment
I can reproduce the substr behavior, so I committed the original patch.
06/14/2007 02:01:18 PM Jan Schneider Comment #7 Reply to this comment
Or do you get the correct path?
I do.
If so, I wonder why they were seeing empty paths?
Me too. It works fine for me without that patch.


06/14/2007 01:43:59 PM Chuck Hagenbuch Comment #6 Reply to this comment
Don't we still need the original poster's patch or something similar, 
then? Or do you get the correct path? If so, I wonder why they were 
seeing empty paths?
06/14/2007 08:44:11 AM Jan Schneider Comment #5 Reply to this comment
Which existing vfs paths? For image ids < 10?
Exactly. We always created one-digit directories for ids < 10, so my 
old photos didn't show up anymore because the vfs directories were 0 
padded now.
06/14/2007 01:59:15 AM Chuck Hagenbuch State ⇒ Feedback
Assigned to Jan Schneider
 
06/14/2007 01:59:03 AM Chuck Hagenbuch Comment #4 Reply to this comment
I reverted this, because the change broke all existing VFS paths.
Which existing vfs paths? For image ids < 10? Shouldn't have affected 
others, and didn't on my install..
06/13/2007 08:57:00 PM Jan Schneider Comment #3 Reply to this comment
I reverted this, because the change broke all existing VFS paths.
05/20/2007 09:52:59 PM Chuck Hagenbuch Comment #2
State ⇒ Resolved
Reply to this comment
I committed a slightly different patch that makes sure that the 
directory is always two characters long (so 9 maps to 09, etc.). Good 
catch, thanks!
05/20/2007 04:22:04 PM tinu (at) humbapa (dot) ch Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ image_id < 10
Queue ⇒ Ansel
New Attachment: Ansel.php.patch Download
State ⇒ Unconfirmed
Reply to this comment
the methode "vfspath" from the ansel lib (lib/Ansel.php) returns a 
wrong path for images with an id smaller than 10 (image_id from table 
ansel_images). eg. id 1 returns '.horde/ansel//...'



my small patch fixes this.



thanks!

martin luethi

Saved Queries