Welcome Guest, Not a member yet? Register   Sign In
image_lib bug in clear() function
#1

[eluser]Unknown[/eluser]
The whitelist of props in the image_lib->clear() function doesn't include the create_thumb property. It should be in that array so it gets unset as well.

This is line 108 of image_lib.php.

I'm not entirely sure how to figure out what version of CI I am using, but the phpDoc at the top of the image_lib.php file has this line, if it helps:
" * @since Version 1.0"

thanks!
C
#2

[eluser]amosmos[/eluser]
too bad CI never picked up on this bug and fixed it.

this is clearly something that needs to be fixed, as the 'clear' function should really return all the config options to their original defaults.

i was trying to resize an image and then make a thumb of it and it took me a full day to figure out why it doesn't work, until finding your post and setting the 'create_thumb' option to it's default FALSE manually.

BTW the clear function also doesn't reset the 'thumb_marker' options to it's default '_thumb' string which means you have to first make the thumb and only then the resize - cause the resize function actually change the 'thumb_marker' option to an empty string and the clear function doesn't reset it back. a better use here would be to not use the 'thumb_marker' string if 'create thumb' is set to FALSE instead of just erasing the 'thumb_marker' but either way the clear function must properly set all options to their defaults regardless.

Amos




Theme © iAndrew 2016 - Forum software by © MyBB