com php-src: Merge branch 'PHP-7.0': ext/pdo/pdo_stmt.c

From: Date: Tue, 12 Jul 2016 13:54:39 +0000
Subject: com php-src: Merge branch 'PHP-7.0': ext/pdo/pdo_stmt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-92973@lists.php.net to get a copy of this message
Commit: 661b560c5fdd68ba318daf33468e3df9535396cc Author: Julien Pauli <jpauli@php.net> Tue, 12 Jul 2016 15:54:39 +0200 Parents: 8ca401f1b28ea7503e3b4cb6ac691f7d539e04b4 61734881100c59fed1d3eefc80db0fc637a87e39 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=661b560c5fdd68ba318daf33468e3df9535396cc Log: Merge branch 'PHP-7.0' * PHP-7.0: Updated NEWS Updated NEWS Revert "Fixes #52384: Adds parameter value to dumped output. Also adds output flag indicating presence of PDO::PARAM_INPUT_OUTPUT." Revert "Fix test for #52384" Conflicts: ext/pdo/pdo_stmt.c Bugs: https://bugs.php.net/52384 Changed paths: MM ext/pdo/pdo_stmt.c Diff: diff --cc ext/pdo/pdo_stmt.c index 07e7957,8d1d909..b2e7620 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@@ -2126,48 -2125,14 +2125,14 @@@ static PHP_METHOD(PDOStatement, debugDu php_stream_printf(out, "Key: Name: [%zd] %.*s\n", ZSTR_LEN(key), (int) ZSTR_LEN(key), ZSTR_VAL(key)); } else { - php_stream_printf(out, "Key: Position #%pd:\n", num); + php_stream_printf(out, "Key: Position #" ZEND_ULONG_FMT ":\n", num); } - php_stream_printf(out, "paramno=" ZEND_LONG_FMT "\nname=[%zd] \"%.*s\"\nis_param=%d\nparam_type=%d\nis_input_output=%d\n", - param->paramno, param->name ? ZSTR_LEN(param->name) : 0, param->name ? (int) ZSTR_LEN(param->name) : 0, - param->name ? ZSTR_VAL(param->name) : "", - param->is_param, - PDO_PARAM_TYPE(param->param_type), - (param->param_type & PDO_PARAM_INPUT_OUTPUT) == PDO_PARAM_INPUT_OUTPUT); - - /* - * Check the type of the parameter and print out the value. - * - * Most are self explanatory with the following exceptions: - * PDO::PARAM_INT evaluates to a long - * PDO::PARAM_LOB evaluates to a string - */ - parameter = param->parameter; - again: - switch (Z_TYPE(parameter)) { - case IS_REFERENCE: - parameter = *Z_REFVAL(parameter); - goto again; - case IS_TRUE: - php_stream_printf(out, "param_value=true\n"); - break; - case IS_FALSE: - php_stream_printf(out, "param_value=false\n"); - break; - case IS_NULL: - php_stream_printf(out, "param_value=null\n"); - break; - case IS_LONG: - php_stream_printf(out, "param_value=%ld\n", Z_LVAL(parameter)); - break; - case IS_STRING: - php_stream_printf(out, "param_value=%s\n", Z_STRVAL(parameter)); - break; - default: - php_stream_printf(out, "param_value=unknown\n"); - break; - } + php_stream_printf(out, "paramno=%pd\nname=[%zd] \"%.*s\"\nis_param=%d\nparam_type=%d\n", + param->paramno, param->name ? ZSTR_LEN(param->name) : 0, param->name ? (int) ZSTR_LEN(param->name) : 0, + param->name ? ZSTR_VAL(param->name) : "", + param->is_param, + param->param_type); } ZEND_HASH_FOREACH_END(); }

« previous php.cvs (#92973) next »