PHP4 Bug #1809: php gives a strange warning (last leak repeated 2 times...)

From: Date: Wed, 21 Jul 1999 20:03:38 +0000
Subject: PHP4 Bug #1809: php gives a strange warning (last leak repeated 2 times...)
Groups: php.dev 
Request: Send a blank email to php-dev+get-8917@lists.php.net to get a copy of this message
From: oliver@billix.franken.de Operating system: linux PHP version: 4.0 Beta 1 PHP Bug Type: Other Bug description: php gives a strange warning (last leak repeated 2 times...) script: ======= <?php function StringsToInteger ( &$array ) { if ( is_array ( $array ) ) { reset ( $array ); while ( list ( $key , $wert ) = each ( $array ) ) $array[$key] += 0; } } $summe = array ( "010" , "00100" , "020" ); StringsToInteger ( $summe ); ?> output: ======= fehler-array.phtml: Freeing 0x08137478 (6 bytes), allocated in zend_variables.c on line 120<br> fehler-array.phtml: Last leak repeated 2 times other info: =========== substituting "$array[$key] += 0;" with "$array[$key] = $array[$key] + 0;" eliminates the warning

« previous php.dev (#8917) next »