#26027 [Bgs]: settype($array, 'string') always raises a notice
| From: | mike@php.net | Date: | Fri, 31 Oct 2003 09:58:26 +0000 |
| Subject: | #26027 [Bgs]: settype($array, 'string') always raises a notice | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-49733@lists.php.net to get a copy of this message | ||
ID: 26027
User updated by: mike@php.net
Reported By: mike@php.net
Status: Bogus
Bug Type: Arrays related
PHP Version: 4.3.3
New Comment:
But what for is the Notice if I call setType explicitely?
I understand
echo $array; raising a Notice, but setType()?
Ciao,
Michael
Previous Comments:
------------------------------------------------------------------------
[2003-10-29 19:52:58] sniper@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
------------------------------------------------------------------------
[2003-10-29 09:02:05] mike@php.net
Description:
------------
setType($array, 'string') always raises a notice
Reproduce code:
---------------
$ php -r '$r=array(); settype($r,'string'); var_dump($r);'
Expected result:
----------------
string(5) "Array"
Actual result:
--------------
PHP Notice: Array to string conversion in Command line code on line 1
string(5) "Array"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26027&edit=1