Bug #54183 [PATCH]: parse_ini_string('prenom = LAI NO') syntax error, unexpected BOOL_FALSE
| From: | erptellez@gmail.com | Date: | Tue, 05 Oct 2021 15:11:40 +0000 |
| Subject: | Bug #54183 [PATCH]: parse_ini_string('prenom = LAI NO') syntax error, unexpected BOOL_FALSE | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-237050@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=54183&edit=1
ID: 54183
Patch added by: erptellez@gmail.com
Reported by: desplats at saficard dot com
Summary: parse_ini_string('prenom = LAI NO') syntax error,
unexpected BOOL_FALSE
Status: Not a bug
Type: Bug
Package: Strings related
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
The following patch has been added/updated:
Patch Name: webAppError_503_Comentario
Revision: 1633446700
URL: https://bugs.php.net/patch-display.php?bug=54183&patch=webAppError_503_Comentario&revision=1633446700
Previous Comments:
------------------------------------------------------------------------
[2011-03-07 18:16:28] felipe@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
------------------------------------------------------------------------
[2011-03-07 18:15:36] tomas dot brastavicius at quantum dot lt
Excerpt from http://php.net/manual/en/function.parse-ini-file.php
[If a value in the ini file contains any non-alphanumeric characters it needs to be enclosed in
double-quotes (")]
Code
<?php
echo parse_ini_string('prenom = "LAI NO"');
?>
works fine.
------------------------------------------------------------------------
[2011-03-07 16:41:29] desplats at saficard dot com
Description:
------------
When using parse_ini_string or parse_ini_file, if the value has a substring as "NO" it
causes a syntax error, unexpected BOOL_FALSE.
Test script:
---------------
<?php
echo parse_ini_string('prenom = LAI NO');
?>
Expected result:
----------------
Array
Actual result:
--------------
PHP Warning: syntax error, unexpected BOOL_FALSE in Unknown on line 1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=54183&edit=1