|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76674 Error message should be more detailed
Submitted: 2018-07-27 17:37 UTC Modified: 2018-08-20 00:38 UTC
Avg. Score:3.5 ± 1.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: teo8976 at gmail dot com Assigned: carusogabriel (profile)
Status: Closed Package: *General Issues
PHP Version: 7.3.0alpha4 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: teo8976 at gmail dot com
New email:
PHP Version: OS:


 [2018-07-27 17:37 UTC] teo8976 at gmail dot com
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:
$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"



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-07-27 20:00 UTC]
Please stop shouting and being generally unpleasant in your bug reports.
 [2018-08-05 00:53 UTC]
I've opened a PR in Github ( for discussion, not only changing the message for `array_intersect` but for most of array_ functions.
 [2018-08-20 00:38 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: carusogabriel
 [2018-08-20 00:38 UTC]
The previous mentioned PR was accepted and merged into PHP-7.3.;a=commit;h=efbf846f
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat May 08 23:01:23 2021 UTC