Bug #79368 [NEW]: "Unexpected end of file" is not an acceptable error message
| From: | php4fan at gmail dot com | Date: | Wed, 11 Mar 2020 16:52:35 +0000 |
| Subject: | Bug #79368 [NEW]: "Unexpected end of file" is not an acceptable error message | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-226031@lists.php.net to get a copy of this message | ||
From: php4fan at gmail dot com
Operating system: all
PHP version: 7.4.4RC1
Package: *General Issues
Bug Type: Bug
Bug description:"Unexpected end of file" is not an acceptable error message
Description:
------------
"Unexpected <whatever>" alone is NEVER an acceptable error message.
You have to tell me what you were expecting instead of what you
unexpectedly found, like: "Unexpected XXXX. YYY or ZZZ expected". If
that is tricky because the spectrum of legal things that could be
expected is too broad, then give a hint or some context: "Unexpected X
in Y", "Unmatched <this>", "incomplete <that>"...
This is especially egregious with "unexpected end of file", which is
usually caused by very trivial errors such an unclosed parenthesis,
bracket, brace... but becomes impossible to debug with such an
uninformative error message. (Unexpected end of file at line 999999
meaning the error can anywhere in a million lines)
It's unbelievable that to this day such an error message is still a
thing.
"Unexpected end of file in 'if' condition / function body / whatever".
You can easily do better than just "unexpected end of file".
--
Edit bug report at https://bugs.php.net/bug.php?id=79368&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79368&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79368&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79368&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79368&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79368&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79368&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79368&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79368&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79368&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79368&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79368&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79368&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79368&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79368&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79368&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79368&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79368&r=mysqlcfg