ID:               29076
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ross dot girshick at gmail dot com
-Status:           Open
+Status:           Bogus
-Bug Type:         Unknown/Other Function
+Bug Type:         *General Issues
 Operating System: Redhat Linux 2.4.20-20.9
 PHP Version:      4.3.7
 New Comment:

I can not reproduce this with Apache 1.3.28 + PHP 4.3.8-dev.
(latest STABLE snapshot from http://snaps.php.net)

And your script as run as is does not output anything but the single "
(rest goes to apache error_log for me, check your error_* settings in
php.ini)



Previous Comments:
------------------------------------------------------------------------

[2004-07-09 17:24:07] ross dot girshick at gmail dot com

Description:
------------
error_log used with addslashes seems to double escape strings.

Other info about my setup:
--------------------------
magic_quotes_gpc        Off     Off
magic_quotes_runtime    Off     Off

Apache Version  Apache/1.3.31 (Unix) PHP/4.3.7
Apache Release  10331100
Apache API Version      19990320
User/Group      smarter(501)/110
Max Requests    Per Child: 0 - Keep Alive: on - Max Per Connection:
10000
Timeouts        Connection: 300 - Keep-Alive: 15
Server Root     /usr/local/apache
Loaded Modules  mod_auth_mysql, mod_php4, mod_setenvif, mod_so,
mod_headers, mod_auth, mod_access, mod_rewrite, mod_alias, mod_userdir,
mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex,
mod_include, mod_status, mod_negotiation, mod_mime, mod_log_config,
mod_env, mod_vhost_alias, http_core

Reproduce code:
---------------
print addslashes(' " ');
error_log(' " ');
error_log(addslashes(' " '));

Expected result:
----------------
code                            output
--                              --
print addslashes(' " ');        \"
error_log(' " ');               "
error_log(addslashes(' " '));   \"

Actual result:
--------------
code                            output
--                              --
print addslashes(' " ');        \"
error_log(' " ');               "
error_log(addslashes(' " '));   \\"   <-- Note the extra '\'


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29076&edit=1

Reply via email to