Undefined variable: file in class-wp-optimize-minify-functions.php on line 1112
-
Hi. Not sure if it’s an issue of the current version only. It’s not really a request for help but a bug report. I get the following:
Notice: Undefined variable: file in .../plugins/wp-optimize/minify/class-wp-optimize-minify-functions.php on line 1112
That’s the code around that line in that file:
foreach ($possible_urls as $possible_url => $path) { $pos = strpos($url, $possible_url); if (false !== $pos) { $file = substr_replace($url, $path, $pos, strlen($possible_url)); break; } } if (file_exists($file)) { return filesize($file); }
As you can see the $file var might not always be defined here. I’ll build in a workaround for myself but you might want to fix the code so that file_exists() can’t try to access $file if it wasn’t defined before.
Thanks for your work and your plugin.
All the best
- The topic ‘Undefined variable: file in class-wp-optimize-minify-functions.php on line 1112’ is closed to new replies.