Re: com php-src: Fixed bug #55415 (php_info produces invalid anchor names): NEWS ext/standard/info.c

From: Date: Mon, 15 Dec 2014 08:58:56 +0000
Subject: Re: com php-src: Fixed bug #55415 (php_info produces invalid anchor names): NEWS ext/standard/info.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-83700@lists.php.net to get a copy of this message
On Sun, Dec 14, 2014 at 11:09 PM, Kalle Sommer Nielsen <kalle@php.net> wrote: > > Commit: ad01fd8b49c6117d5c5fce98871c41781a5c00b9 > Author: Kalle Sommer Nielsen <kalle@php.net> Sun, 14 Dec 2014 > 23:09:13 +0100 > Parents: 9afae43b1238291f7c11fc9a2075289d07fb5ccf > Branches: master > > Link: > > http://git.php.net/?p=php-src.git;a=commitdiff;h=ad01fd8b49c6117d5c5fce98871c41781a5c00b9 > > Log: > Fixed bug #55415 (php_info produces invalid anchor names) > > @@ Slightly based off Johannes' patch > > Bugs: > https://bugs.php.net/55415 > > Changed paths: > M NEWS > M ext/standard/info.c > > > Diff: > diff --git a/NEWS b/NEWS > index a57e6cb..aad4837 100644 > --- a/NEWS > +++ b/NEWS > @@ -28,6 +28,7 @@ > modifier. (Guilherme Blanco) > . is_long() & is_integer() is now an alias of is_int(). (Kalle) > . Implemented FR #55467 (phpinfo: PHP Variables with $ and single > quotes). (Kalle) > + . Fixed bug #55415 (php_info produces invalid anchor names). (Kalle, > Johannes) > > - Date: > . Fixed day_of_week function as it could sometimes return negative > values > diff --git a/ext/standard/info.c b/ext/standard/info.c > index 73ec873..d6911a4 100644 > --- a/ext/standard/info.c > +++ b/ext/standard/info.c > @@ -146,7 +146,13 @@ PHPAPI void php_info_print_module(zend_module_entry > *zend_module TSRMLS_DC) /* { > { > if (zend_module->info_func || zend_module->version) { > if (!sapi_module.phpinfo_as_text) { > - php_info_printf("<h2><a > name=\"module_%s\">%s</a></h2>\n", zend_module->name, > zend_module->name); > + int len = 0; > + zend_string *url_name = > php_url_encode(zend_module->name, strlen(zend_module->name), &len); > + > + php_strtolower(url_name->val, url_name->len); > + php_info_printf("<h2><a > name=\"module_%s\">%s</a></h2>\n", url_name->val, > zend_module->name); > + > + efree(url_name); > } else { > php_info_print_table_start(); > php_info_print_table_header(1, zend_module->name); > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > hi Kalle, ext/standard/tests/general_functions/phpinfo2.phpt started to fail/segfault after your commit: https://travis-ci.org/php/php-src/builds/44033219 -- Ferenc Kovács @Tyr43l - http://tyrael.hu

« previous php.cvs (#83700) next »