JamesHeinrich / phpThumb

phpThumb() - The PHP thumbnail generator
Other
315 stars 98 forks source link

problem with class_exists and autoloading #171

Closed renarena closed 3 years ago

renarena commented 3 years ago

https://github.com/JamesHeinrich/phpThumb/issues/94 the change for of this issue caused another one: if you use class autoloading this may cause an error if loading the class fails (different location then classes of main project). This can be prevented by setting the parameter autoload to false. class_exists ( string $class_name , bool $autoload = false )

JamesHeinrich commented 3 years ago

Can you submit a PR showing exactly what you're suggesting to change, please?

renarena commented 3 years ago

in phpthumb.class.php and phpthumb.configphp change if (!class_exists('phpthumb_functions')) to if (!class_exists('phpthumb_functions',false))

JamesHeinrich commented 3 years ago

Changed in https://github.com/JamesHeinrich/phpThumb/commit/95da9548cb793549074ff6cde8f50326c3c71aa6