Fix "PHP Warning: No such file or directory css/user_themes/20141204-94.css in share.php:21" #216

Open
Krinkle opened this Issue Jan 5, 2015 · 0 comments

Projects

None yet

1 participant

@Krinkle
Member
Krinkle commented Jan 5, 2015

The Apache2 error logs (splunk.jquery.com) are flooded with these:

[05-Jan-2015 15:22:01 America/Los_Angeles] PHP Warning:  unlink(css/
 user_themes/20141204-94.css):
 No such file or directory in /var/www/themeroller.jquerymobile.com/share.php on line 21
[05-Jan-2015 15:22:01 America/Los_Angeles] PHP Warning:  unlink(css/
 user_themes/20141204-93.css):
 No such file or directory in /var/www/themeroller.jquerymobile.com/share.php on line 21

Either the file is supposed to exist and a bug elsewhere needs fixing, or the code should do a file_exists check first. Depending on what the http request needs, it may also need an else handling in case the file doesn't exist. Alternatively, the warning could be surpressed with @unlink().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment