
12 Jan
2006
12 Jan
'06
12:33 p.m.
Hi, while trying Stewart Morgan's patch, I found this situation and would like your advice before opening a PHP bug. Look at this sample code: <?php $the_query = "INSERT INTO `aaa` (`f1`, `f2`) VALUES ('1', 'aaa')"; preg_match('@INSERT\sINTO\s\`([^\`]+)\`@iu', $the_query, $error_table = array() ); print_r($error_table); ?> On PHP 5.1.0-RC4 I get Array ( [0] => INSERT INTO `aaa` [1] => aaa ) On PHP 5.1.2 I get Array ( ) If I change to preg_match('@INSERT\sINTO\s\`([^\`]+)\`@iu', $the_query, $error_table); it works. Is it supposed to be wrong now to use the $error_table = array() syntax? Marc