|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-11-09 05:01 UTC] hholzgra@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 16:00:01 2025 UTC |
In the example below the gpc_order entry has the value "GPC" that should be imported in the configuration hash as a 3 bytes long string. But it is imported as 5 bytes with two zero bytes after the "GPC" characters. The patch to configuration-scanner.l is below the example. <? $i = parse_ini_file("/usr/local/lib/php.ini"); print(addslashes($i["gpc_order"])); print("\n"); ?> --- configuration-scanner.l Mon Jun 26 21:15:49 2000 +++ /home/alex/develop/php-4.0.2.ok/main/configuration-scanner.l Tue Sep 19 09:01:46 2000 @@ -107,21 +107,21 @@ <INITIAL>["][^\n\r"]*["] { /* ENCAPSULATED TC_STRING */ /* eat trailing " */ yytext[yyleng-1]=0; /* eat leading " */ yytext++; cfglval->value.str.val = zend_strndup(yytext,yyleng); - cfglval->value.str.len = yyleng; + cfglval->value.str.len = yyleng - 2; cfglval->type = IS_STRING; return TC_ENCAPSULATED_STRING; } <INITIAL>[&|~()!] { return yytext[0]; } <INITIAL>[^=\n\r\t;|&~()!"]+ {