felipe          Mon Nov  3 20:55:01 2008 UTC

  Added files:                 (Branch: PHP_5_2)
    /php-src/ext/pdo_sqlite/tests       debugdumpparams_001.phpt 

  Modified files:              
    /php-src/ext/pdo    pdo_stmt.c 
    /php-src    NEWS 
  Log:
  MFH:
  - Fixed endless loop in PDOStatement::debugDumpParams()
    patch by: Jonah H. Harris <jonah.harris at gmail dot com>
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.38.2.42&r2=1.118.2.38.2.43&diff_format=u
Index: php-src/ext/pdo/pdo_stmt.c
diff -u php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.42 
php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.43
--- php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.42  Mon Nov  3 15:41:35 2008
+++ php-src/ext/pdo/pdo_stmt.c  Mon Nov  3 20:55:01 2008
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: pdo_stmt.c,v 1.118.2.38.2.42 2008/11/03 15:41:35 felipe Exp $ */
+/* $Id: pdo_stmt.c,v 1.118.2.38.2.43 2008/11/03 20:55:01 felipe Exp $ */
 
 /* The PDO Statement Handle Class */
 
@@ -2189,6 +2189,7 @@
                                param->is_param,
                                param->param_type);
                        
+                       zend_hash_move_forward_ex(stmt->bound_params, &pos);
                }
        }
 
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1297&r2=1.2027.2.547.2.1298&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1297 php-src/NEWS:1.2027.2.547.2.1298
--- php-src/NEWS:1.2027.2.547.2.1297    Mon Nov  3 16:59:18 2008
+++ php-src/NEWS        Mon Nov  3 20:55:01 2008
@@ -38,6 +38,8 @@
   filter). (Arnaud)
 - Fixed bug #42294 (Unified solution for round() based on C99 round). (Ilia)
 
+- Fixed endless loop in PDOStatement::debugDumpParams().
+  (jonah.harris at gmail dot com)
 - Fixed ability to use "internal" heaps in extensions. (Arnaud, Dmitry)
 - Fixed weekdays adding/subtracting algorithm. (Derick)
 - Fixed some ambiguities in the date parser. (Derick)

http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/tests/debugdumpparams_001.phpt?view=markup&rev=1.1
Index: php-src/ext/pdo_sqlite/tests/debugdumpparams_001.phpt
+++ php-src/ext/pdo_sqlite/tests/debugdumpparams_001.phpt
--TEST--
Testing PDOStatement::debugDumpParams() with bound params
--SKIPIF--
<?php
if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
?>
--FILE--
<?php

$db = new pdo('sqlite:memory');

$x= $db->prepare('select :a, :b');
$x->bindValue(':a', 1, PDO::PARAM_INT);
$x->bindValue(':b', 'foo');
var_dump($x->debugDumpParams());

?>
--EXPECT--
SQL: [13] select :a, :b
Params:  2
Key: Position #0:
paramno=-1
name=[2] :a
is_param=1
param_type=1
Key: Position #0:
paramno=-1
name=[2] :b
is_param=1
param_type=2
NULL



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to