Bug #66057 [Opn]: strtr converts unused variables to strings
| From: | themylogin at gmail dot com | Date: | Fri, 08 Nov 2013 07:46:59 +0000 |
| Subject: | Bug #66057 [Opn]: strtr converts unused variables to strings | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-182653@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66057&edit=1
ID: 66057
User updated by: themylogin at gmail dot com
Reported by: themylogin at gmail dot com
-Summary: strt converts unused variables to strings
+Summary: strtr converts unused variables to strings
Status: Open
Type: Bug
Package: Strings related
Operating System: Linux
PHP Version: 5.5.5
Block user comment: N
Private report: N
New Comment:
fix typo
Previous Comments:
------------------------------------------------------------------------
[2013-11-08 07:45:59] themylogin at gmail dot com
Description:
------------
With PHP 5.5.5 when I call
php > strtr("a", array("a" => "b", "c" => new
stdclass));
I get
PHP Catchable fatal error: Object of class stdClass could not be converted to string in php shell
code on line 1
This used to work with PHP 5.4 and there is no reason why it shouldn't work now (haystack does
not contain "c", so variable with appropriate key should not be used anyway).
Test script:
---------------
strtr("a", array("a" => "b", "c" => new stdclass));
Expected result:
----------------
No error
Actual result:
--------------
PHP Catchable fatal error: Object of class stdClass could not be converted to string in php shell
code on line 1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66057&edit=1