NYCPHP Meetup

NYPHP.org

[nycphp-talk] Addcslashes bug

Cliff Hirsch cliff at pinestream.com
Mon Feb 11 20:54:50 EST 2008


>> On Feb 11, 2008 6:40 PM, Cliff Hirsch <cliff at pinestream.com> wrote:
>>>  I had a very strange error, catastrophic yesterday. addcslashes failed to
>>> put a slash in front of a single quote. Can anyone imagine how this could
>>> happen? Is it possible it didn't catch a multi-byte character? Am I back to
>>> charset issues? Unfortunately, I can't reproduce the error.

On 2/11/08 6:58 PM, "Matteo Rinaudo" <matteo.rinaudo at gmail.com> wrote:
>> Hi - do the Apache logs show you something (if you log them via
>> php.ini) like warning or errors related to this issue?
> 
> Sorry, I meant `if you log the PHP errors using the log_errors
> directive in php.ini'.
> Matteo Rinaudo
> 

The logs picked up the error after the damage was done: "PHP Parse error:
syntax error, unexpected T_STRING". But the logs don't indicate why
addcslashes failed to slash a single quote in this one instance.





More information about the talk mailing list