Bug #62633 [NEW]: strcasecmp does not warn user if both params are not strings
| From: | iam4webwork at hotmail dot com | Date: | Sun, 22 Jul 2012 21:19:42 +0000 |
| Subject: | Bug #62633 [NEW]: strcasecmp does not warn user if both params are not strings | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-172155@lists.php.net to get a copy of this message | ||
From: iam4webwork at hotmail dot com
Operating system:
PHP version: Irrelevant
Package: Scripting Engine problem
Bug Type: Bug
Bug description:strcasecmp does not warn user if both params are not strings
Description:
------------
When I provide strcasecmp with two parameters where one is TRUE and the
other is a
string, php does not generate a warning to say that the first parameter
needs to
be a string and silently converts TRUE to "1" and executes.
Test script:
---------------
<?php
var_dump(strcasecmp(TRUE, "bob"));
// -49
Expected result:
----------------
I expected a parser error message.
Actual result:
--------------
-49
--
Edit bug report at https://bugs.php.net/bug.php?id=62633&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62633&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62633&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62633&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=62633&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62633&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=62633&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=62633&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=62633&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=62633&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=62633&r=support
Expected behavior: https://bugs.php.net/fix.php?id=62633&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=62633&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=62633&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=62633&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62633&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=62633&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=62633&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=62633&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=62633&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=62633&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=62633&r=mysqlcfg