Bug #76674 [NEW]: Error message should be more detailed
| From: | teo8976 at gmail dot com | Date: | Fri, 27 Jul 2018 17:37:31 +0000 |
| Subject: | Bug #76674 [NEW]: Error message should be more detailed | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-216506@lists.php.net to get a copy of this message | ||
From: teo8976 at gmail dot com
Operating system:
PHP version: 7.3.0alpha4
Package: *General Issues
Bug Type: Bug
Bug description:Error message should be more detailed
Description:
------------
EVERY TIME something is not what is expected to be, the error message
should say both what it should have been, and what it was instead.
I f***ng hate when an error message gets so close to giving me the all
the needed information, but it deliberately omits one tiny but crucial
bit of detaildetail, that it would have cost nothing to include.
Test script:
---------------
$a=array(1,2,3);
$b='this is a string';
array_intersect($a, $b);
Expected result:
----------------
The error message should be something like:
"Warning: array_intersect(): Argument #2 should be an array, string
given instead"
Actual result:
--------------
The error message is:
"Warning: array_intersect(): Argument #2 is not an array"
WHY DON'T YOU TELL ME WHAT THE F*** IT IS?
--
Edit bug report at https://bugs.php.net/bug.php?id=76674&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76674&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76674&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76674&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76674&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76674&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76674&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76674&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76674&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76674&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76674&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76674&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76674&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76674&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76674&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76674&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76674&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76674&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76674&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76674&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76674&r=mysqlcfg