php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #29489 Wrong error text with is_* functions (is_array, ...)
Submitted: 2004-08-02 11:03 UTC Modified: 2004-08-02 21:13 UTC
Votes:2
Avg. Score:2.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: e dot colinet at laposte dot net Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 5.0.0 OS: any
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: e dot colinet at laposte dot net
New email:
PHP Version: OS:

 

 [2004-08-02 11:03 UTC] e dot colinet at laposte dot net
Description:
------------
Wrong error text when no arguments provided to is_* functions.

Reproduce code:
---------------
php -r "is_array();"


Expected result:
----------------
Wrong parameter count for is_array()

Actual result:
--------------
Only one argument expected

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-02 11:08 UTC] e dot colinet at laposte dot net
It's in ext/standard/type.c function php_is_type.

Line 209

> php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only one argument expected");

< php_error_docref(NULL TSRMLS_CC, E_WARNING, "Wrong parameter count");


Not so important but it's confusing :-)
 [2004-08-02 16:27 UTC] tony2001@php.net
I see no reason to change this particular error message and leave about 1922 similar messages untouched.
You always can have a look at the appropriate docs and learn what number of arguments this function expects.
 [2004-08-02 21:13 UTC] e dot colinet at laposte dot net
Thanks for the traditionnal "Look at the manual".

"Only One" refer to a situation where a call to a function use more than one argument. It have annoyed me 5 min (more than one is_array fit on a line) and it's a 2 sec fix.

But please forget it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 29 08:01:30 2024 UTC