php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49388 magic_quotes_gpc=on produces deprecated msg on CLI even if error_reporting=0
Submitted: 2009-08-27 14:14 UTC Modified: 2009-08-30 19:35 UTC
From: romanf at trash dot net Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.3.0 OS: OpenSuse 11
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: romanf at trash dot net
New email:
PHP Version: OS:

 

 [2009-08-27 14:14 UTC] romanf at trash dot net
Description:
------------
I have a php.ini with

error_reporting=0
magic_quotes_gpc=on

If I run a test-script on the CLI, the deprecated warning is still shown on stderr.

When run under a webserver (e.g. apache) no output is produced.

Expected result:
----------------
Deprecated warning should be suppressed on CLI as well if error_reporting=0.

Actual result:
--------------
Deprecated warning is NOT suppressed on CLI (and only on CLI) if magic_quotes_gpc=on regardless of error_reporting.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-27 16:14 UTC] sjoerd@php.net
Thank you for your bug report.

I could reproduce your problem with the following command:
php -d 'error_reporting=0' -d 'magic_quotes_gpc=on' -r ''

It seems that PHP is not yet initialized when the warning is triggered. When it is not initialized it prints all warnings without taking error_reporting into account (module_initialized is 0 on main/main.c:920).
 [2009-08-29 01:25 UTC] jani@php.net
Same as bug #49362
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Dec 05 22:00:02 2025 UTC