Changed deprecated ini options on startup from E_WARNING to E_DEPRECATED (Fixes #52570)

# Trunk patch will follow shortly
This commit is contained in:
Kalle Sommer Nielsen 2010-08-11 21:12:18 +00:00
parent 7d55780ca0
commit 8deefa8780
33 changed files with 57 additions and 55 deletions

5
NEWS
View file

@ -1,6 +1,9 @@
PHP NEWS
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2010, PHP 5.3.4
- Changed deprecated ini options on startup from E_WARNING to E_DEPRECATED.
(Kalle)
- Fixed bug #52573 (SplFileObject::fscanf Segmentation fault). (Felipe)
- Fixed bug #52546 (pdo_dblib segmentation fault when iterating MONEY values).
(Felipe)

View file

@ -19,7 +19,7 @@ echo $HTTP_SESSION_VARS;
echo "\nok\n";
?>
--EXPECTF--
Warning: Directive 'register_long_arrays' is deprecated in PHP %d.%d and greater in Unknown on line 0
Deprecated: Directive 'register_long_arrays' is deprecated in PHP %d.%d and greater in Unknown on line 0
ok
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at %sunset_cv05.php on line %d

View file

@ -19,7 +19,7 @@ echo $x;
echo "ok\n";
?>
--EXPECTF--
Warning: Directive 'register_globals' is deprecated in PHP %d.%d and greater in Unknown on line 0
Deprecated: Directive 'register_globals' is deprecated in PHP %d.%d and greater in Unknown on line 0
1
Deprecated: Function session_register() is deprecated in %s on line %d

View file

@ -27,7 +27,7 @@ curl_close($ch);
var_dump( $curl_content );
?>
--EXPECTF--
Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
*** Testing curl_setopt with CURLOPT_FOLLOWLOCATION in safemode
Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in %s on line %d

View file

@ -37,7 +37,7 @@ magic_quotes_runtime=1
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECT--
Warning: Directive 'magic_quotes_runtime' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'magic_quotes_runtime' is deprecated in PHP 5.3 and greater in Unknown on line 0
database handler: cdb_make
string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5"
string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5"

View file

@ -20,7 +20,7 @@ magic_quotes_runtime=1
var_dump(exif_read_data(dirname(__FILE__).'/test6.jpg','',true,false));
?>
--EXPECTF--
Warning: Directive 'magic_quotes_runtime' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'magic_quotes_runtime' is deprecated in PHP 5.3 and greater in Unknown on line 0
array(5) {
["FILE"]=>
array(6) {

View file

@ -12,6 +12,6 @@ parse_str("val=%22probably+a+bug%22");
echo $val . "\n";
?>
--EXPECT--
Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
\"probably a bug\"
\"probably a bug\"

View file

@ -15,7 +15,7 @@ $r = oci_password_change($c, "hr", "hrpwd", "hrpwd");
echo "Done\n";
?>
--EXPECTF--
%sarning:%sDirective 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
Warning: oci_connect(): Privileged connect is disabled in Safe Mode in %s on line %d

View file

@ -9,5 +9,5 @@ $str = preg_replace("/(some.*text)/e", "strtoupper('\\1')", $str);
echo $str . "\r\n";
?>
--EXPECT--
Warning: Directive 'magic_quotes_sybase' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'magic_quotes_sybase' is deprecated in PHP 5.3 and greater in Unknown on line 0
SOME '$SAMPLE' TEXT

View file

@ -43,7 +43,7 @@ chmod ($filename, 0700);
unlink($filename);
?>
--EXPECTF--
Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in %s on line %d
Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in %s on line %d
bool(true)
bool(true)
bool(true)

View file

@ -37,7 +37,7 @@ chmod ($filename, 0700);
unlink($filename);
?>
--EXPECTF--
Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line %d
Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line %d
bool(false)
bool(false)
bool(false)

View file

@ -28,7 +28,7 @@ var_dump(posix_access('./foobar'));
?>
===DONE===
--EXPECTF--
Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
Warning: posix_access() expects at least 1 parameter, 0 given in %s on line %d
bool(false)

View file

@ -19,6 +19,6 @@ var_dump(posix_access('/tmp', POSIX_W_OK));
?>
===DONE===
--EXPECTF--
Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in %s on line %d
Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in %s on line %d
bool(false)
===DONE===

View file

@ -36,7 +36,7 @@ unlink($dir . '/bar');
rmdir($dir);
?>
--EXPECTF--
Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in %s on line %d
Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in %s on line %d
Warning: posix_mkfifo(): SAFE MODE Restriction in effect. The script whose uid is %d is not allowed to access /tmp owned by uid %d in %s on line %d
bool(false)

View file

@ -31,7 +31,7 @@ print session_encode()."\n";
session_destroy();
--EXPECTF--
Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Function session_register() is deprecated in %s on line %d

View file

@ -28,7 +28,7 @@ var_dump($baz);
var_dump($arr);
session_destroy();
--EXPECT--
Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
object(foo)#1 (2) {
["bar"]=>
string(2) "ok"

View file

@ -73,7 +73,7 @@ var_dump($arr);
session_destroy();
?>
--EXPECT--
Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
OPEN: PHPSESSID
READ: abtest
object(foo)#2 (2) {

View file

@ -85,7 +85,7 @@ var_dump($baz); var_dump($arr); var_dump($c);
session_destroy();
?>
--EXPECTF--
Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
OPEN: PHPSESSID
READ: abtest
object(foo)#2 (2) {

View file

@ -45,7 +45,7 @@ echo "values after session:\n";
var_dump($a,$b);
?>
--EXPECTF--
Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
original values:
object(a)#%d (1) {
["test"]=>

View file

@ -50,9 +50,9 @@ var_dump($HTTP_SESSION_VARS);
session_destroy();
?>
--EXPECTF--
Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Warning: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Function session_register() is deprecated in %s on line %d
float(3.14)

View file

@ -58,7 +58,7 @@ var_dump($HTTP_SESSION_VARS);
session_destroy();
?>
--EXPECTF--
Warning: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0
NULL
session_write_close(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively
array(1) {

View file

@ -43,7 +43,7 @@ var_dump($HTTP_SESSION_VARS);
session_destroy();
?>
--EXPECT--
Warning: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0
array(0) {
}
array(1) {

View file

@ -32,7 +32,7 @@ session_destroy();
print "I live\n";
?>
--EXPECTF--
Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Function session_register() is deprecated in %s on line %d
I live

View file

@ -24,5 +24,5 @@ session_destroy();
print "I live\n";
?>
--EXPECT--
Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
I live

View file

@ -33,7 +33,7 @@ ini_set("session.use_trans_sid","1");
session_destroy();
?>
--EXPECTF--
Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
<a href="/link?PHPSESSID=abtest">
Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in %s on line %d

View file

@ -47,7 +47,7 @@ var_dump($_SESSION);
session_destroy();
?>
--EXPECTF--
Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Function session_register() is deprecated in %s on line %d
array(2) {

View file

@ -14,7 +14,7 @@ var_dump(get_cfg_var( 'register_globals' ) );
?>
--EXPECTF--
Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in %s on line 0
Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in %s on line 0
*** Test by calling method or function with deprecated option ***
string(1) "1"

View file

@ -16,7 +16,7 @@ print ($set ? 'it worked' : 'boo') . "\n";
?>
==DONE==
--EXPECTF--
Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
Warning: putenv(): Safe Mode warning: Cannot set environment variable 'FOO' - it's not in the allowed list in %s on line %d

View file

@ -12,7 +12,7 @@ putenv('BAZ=bop');
?>
==DONE==
--EXPECTF--
Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
Warning: putenv(): Safe Mode warning: Cannot override protected environment variable 'FOO' in %s on line %d

View file

@ -7,5 +7,5 @@ define_syslog_variables=On
var_dump(isset($LOG_ERR));
?>
--EXPECTF--
Warning: Directive 'define_syslog_variables' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'define_syslog_variables' is deprecated in PHP 5.3 and greater in Unknown on line 0
bool(true)

View file

@ -91,7 +91,7 @@ var_dump($res);
?>
===DONE===
--EXPECTF--
Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
*** Testing parse_str() : basic functionality ***
Test string with array values

View file

@ -2076,7 +2076,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
while (*p) {
if (cfg_get_long((char*)*p, &val) == SUCCESS && val) {
zend_error(E_WARNING, "Directive '%s' is deprecated in PHP 5.3 and greater", *p);
zend_error(E_DEPRECATED, "Directive '%s' is deprecated in PHP 5.3 and greater", *p);
}
++p;
}

View file

@ -28,6 +28,8 @@ var_dump($GLOBALS["o1\'file"]);
var_dump($GLOBALS["o1\'file"] === $_FILES["o1\'file"]["tmp_name"]);
?>
--EXPECTF--
Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
array(2) {
["o1\'file"]=>
array(5) {
@ -60,6 +62,3 @@ string(12) "o1"
bool(true)
string(%d) "%s"
bool(true)
Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0