0

I have this simple test case file:

<?php
echo @filesize("notexistentfile");
echo "Done";

When I run it via nginx + fastcgi, sometimes it prints Done as expected (filesize on a non existent file is expected to raise a E_WARNING which is masked out by the @ operator), sometimes i receive a weird:

Fatal error: Uncaught exception 'Exception' with message 'filesize() [function.filesize]: stat failed for

To make it clear: I DONT HAVE any kind of error_handler which could intercept the error and then throw an exception.

Let's make it more clear: the issue is NOT about filesize failing or working: it ALWAYS fails (as exepcted) because the file is not existent.

The issue is that sometimes fails with an E_WARNING, sometimes with an exception

Alar
  • 760
  • 4
  • 11
  • Maybe this question can help: http://stackoverflow.com/q/7120793 – gen_Eric Nov 07 '13 at 18:25
  • Thank you Rocket, but my case is totally different. In my case filesize is ALWAYS failing as expected BUT sometimes fails with error, sometimes with exception – Alar Nov 07 '13 at 18:32

0 Answers0