pThumb
pThumb copied to clipboard
Fix PHP warning : is_readable() open_basedir restriction in effect.
The Modx error log is flooded with lines like the example below when using open_basedir
settings in php.ini
. (open_basedir
is used as a security measure)
PHP warning: is_readable(): open_basedir restriction in effect. File(/static/img/abc.webp) is not within the allowed path(s): (/var/sitename/htdocs:/tmp)
Testing if open_basedir
has a string prevents is_readable() being called with a path outside these limits. Thus avoiding these loglines.