Bug #68031 [NEW]: htmlspecialchars returns empty string, sometimes
| From: | pfenderd at bellsouth dot net | Date: | Tue, 16 Sep 2014 19:24:24 +0000 |
| Subject: | Bug #68031 [NEW]: htmlspecialchars returns empty string, sometimes | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-187554@lists.php.net to get a copy of this message | ||
From: pfenderd at bellsouth dot net
Operating system: Linux
PHP version: 5.5.16
Package: Filter related
Bug Type: Bug
Bug description:htmlspecialchars returns empty string, sometimes
Description:
------------
Occasionally,htmlspecialchars() returns an empty string value.
It is consistent for certain string values and not a random problem.
The string is usually long (several 100 chars).
The problem did not exist in version 5.3.14 but does in later versions
of 5.4 and 5.5.16.
In a list of assignments to variables using htmlspecialchars(), it fails
on the 5th of 10. The others always work properly, but the other string
values are always much shorter than the one that fails.
I created a simple test script, but the script always works.
The problem is probably affected by the other code surrounding the
problem statement.
This is a serious problem because the code is used to maintain values in
a database for a website and is not able to do so when database values
cannot be seen in a management form.
NOTE:
I found a work-around solution to the problem by moving the line of code
with the problem farther down the list of assignments. So it may not be
a problem directly with htmlspecialchars(), but with the PHP script
processor.
--
Edit bug report at https://bugs.php.net/bug.php?id=68031&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68031&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68031&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68031&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68031&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68031&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68031&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68031&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68031&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68031&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68031&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68031&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68031&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68031&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68031&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68031&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68031&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68031&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68031&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68031&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68031&r=mysqlcfg