Issue Bug Closed

#58466Image Processing preset not properly detected

Anja Leichsenring 05/03/14, 21:28 updated 10/02/18, 11:55

Description

In case of active open_basedir restriction the detection of available Image Manipulation libraries might fail.
My setup tells the open_basedir allows /usr/bin/gm, but not /usr/bin. Therefor the condition is_dir(/usr/bin/) && is_file(/usr/bin/gm) returns TRUE, where is_dir is FALSE and is_file is TRUE.
The is_dir($path) is superflous, because is_file does the same and the surpresses the PHP Warning anyway.
Conclusion: it does not hurt to remove the @is_dir condition alltogether and for such restricted the environments as mine detect the library properly.

Reviews 1