Ask a Question related to PHP Bugs, Design and Development.
-
derick@php.net #1
#38974 [Opn->Bgs]: array should throw warning
ID: 38974
Updated by: [email]derick@php.net[/email]
Reported By: hendlerman at yahoo dot com
-Status: Open
+Status: Bogus
Bug Type: Arrays related
Operating System: windows XP
PHP Version: 5.1.6
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
[url]http://www.php.net/manual/[/url] and the instructions on how to report
a bug at [url]http://bugs.php.net/how-to-report.php[/url]
..
Previous Comments:
------------------------------------------------------------------------
[2006-09-27 14:47:10] hendlerman at yahoo dot com
Description:
------------
The error is caused by a user error, but I believe PHP should be
throwing an error. PHP is not strongly typed, but I thought you get a
warning if you try to convert a string to an array.
Sorry I am not in 5.1.6
Reproduce code:
---------------
/**
* Output for me
* PHP version 5.1.4
* Array ( [name] => 2alue )
*
* */
function array_bug()
{
echo "PHP version ". phpversion().'<br />';
$test_array = array();
$test_array['name'] = 'value';
$test_array['name']['count'] = 2;
print_r($test_array);
}
array_bug(); exit;
Expected result:
----------------
I would expect an error or warning
Actual result:
--------------
Array ( [name] => 2alue )
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=38974&edit=1[/url]
derick@php.net Guest
-
#40793 [NEW]: xmlrpc_is_fault shows warning if parameter is not an array
From: camka at email dot ee Operating system: windows PHP version: 5.2.1 PHP Bug Type: XMLRPC-EPI related Bug description: ... -
#40793 [Opn->Bgs]: xmlrpc_is_fault shows warning if parameter is not an array
ID: 40793 Updated by: tony2001@php.net Reported By: camka at email dot ee -Status: Open +Status: ... -
#39915 [NEW]: Trying to access the index of an integer should throw a warning
From: thuejk at gmail dot com Operating system: Linux PHP version: 5.2.0 PHP Bug Type: Feature/Change Request Bug... -
#38974 [NEW]: array should throw warning
From: hendlerman at yahoo dot com Operating system: windows XP PHP version: 5.1.6 PHP Bug Type: Arrays related Bug... -
Warning: Cannot use a scalar value as an array in
Hi all This has just started coming up on a site I run. I haven't changed anything, it just started happening. Unfortunately, it's an adult...



Reply With Quote

