Bug #76674 [Com]: Error message should be more detailed
| From: | carusogabriel@php.net | Date: | Sun, 05 Aug 2018 00:53:22 +0000 |
| Subject: | Bug #76674 [Com]: Error message should be more detailed | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-216589@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76674&edit=1
ID: 76674
Comment by: carusogabriel@php.net
Reported by: teo8976 at gmail dot com
Summary: Error message should be more detailed
Status: Open
Type: Bug
Package: *General Issues
PHP Version: 7.3.0alpha4
Block user comment: N
Private report: N
New Comment:
I've opened a PR in Github (https://github.com/php/php-src/pull/3429) for discussion, not only
changing the message for
array_intersect but for most of array_ functions.
Previous Comments:
------------------------------------------------------------------------
[2018-07-27 20:00:13] danack@php.net
Please stop shouting and being generally unpleasant in your bug reports.
------------------------------------------------------------------------
[2018-07-27 17:37:31] teo8976 at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=76674&edit=1