Skip to content

Commit 605c5c3

Browse files
committed
Cleanup of remaning E_STRICT
1 parent f573ba1 commit 605c5c3

File tree

9 files changed

+24
-32
lines changed

9 files changed

+24
-32
lines changed

Zend/zend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ ZEND_API zend_bool zend_rc_debug = 0;
9494
static ZEND_INI_MH(OnUpdateErrorReporting) /* {{{ */
9595
{
9696
if (!new_value) {
97-
EG(error_reporting) = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED;
97+
EG(error_reporting) = E_ALL & ~E_NOTICE & ~E_DEPRECATED;
9898
} else {
9999
EG(error_reporting) = atoi(ZSTR_VAL(new_value));
100100
}

ext/mysqli/mysqli_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,7 +1606,7 @@ PHP_FUNCTION(mysqli_next_result) {
16061606
MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
16071607

16081608
if (!mysql_more_results(mysql->mysql)) {
1609-
php_error_docref(NULL, E_STRICT, "There is no next result set. "
1609+
php_error_docref(NULL, E_NOTICE, "There is no next result set. "
16101610
"Please, call mysqli_more_results()/mysqli::more_results() to check "
16111611
"whether to call this function/method");
16121612
}
@@ -1644,7 +1644,7 @@ PHP_FUNCTION(mysqli_stmt_next_result) {
16441644
MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID);
16451645

16461646
if (!mysqlnd_stmt_more_results(stmt->stmt)) {
1647-
php_error_docref(NULL, E_STRICT, "There is no next result set. "
1647+
php_error_docref(NULL, E_NOTICE, "There is no next result set. "
16481648
"Please, call mysqli_stmt_more_results()/mysqli_stmt::more_results() to check "
16491649
"whether to call this function/method");
16501650
}

ext/pdo/pdo_stmt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info *
764764
return 0;
765765
}
766766
if (is_callable_error) {
767-
/* Possible E_STRICT error message */
767+
/* Possible error message */
768768
efree(is_callable_error);
769769
}
770770

ext/phar/util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ int phar_free_alias(phar_archive_data *phar, char *alias, size_t alias_len) /* {
934934
return FAILURE;
935935
}
936936

937-
/* this archive has no open references, so emit an E_STRICT and remove it */
937+
/* this archive has no open references, so emit a notice and remove it */
938938
if (zend_hash_str_del(&(PHAR_G(phar_fname_map)), phar->fname, phar->fname_len) != SUCCESS) {
939939
return FAILURE;
940940
}

ext/standard/html.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ PHPAPI zend_string *php_escape_html_entities_ex(unsigned char *old, size_t oldle
11871187

11881188
if (all) { /* replace with all named entities */
11891189
if (CHARSET_PARTIAL_SUPPORT(charset)) {
1190-
php_error_docref(NULL, E_STRICT, "Only basic entities "
1190+
php_error_docref(NULL, E_NOTICE, "Only basic entities "
11911191
"substitution is supported for multi-byte encodings other than UTF-8; "
11921192
"functionality is equivalent to htmlspecialchars");
11931193
}

ext/zip/examples/get_set_comments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
error_reporting(E_ALL|E_STRICT);
2+
error_reporting(E_ALL);
33

44
copy('test_with_comment.zip', 't.zip');
55
$z = new ZipArchive;

php.ini-development

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@
104104
; Production Value: Off
105105

106106
; error_reporting
107-
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
107+
; Default Value: E_ALL & ~E_NOTICE & ~E_DEPRECATED
108108
; Development Value: E_ALL
109-
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
109+
; Production Value: E_ALL & ~E_DEPRECATED
110110

111111
; log_errors
112112
; Default Value: Off
@@ -409,7 +409,7 @@ memory_limit = 128M
409409
; operators. The error level constants are below here for convenience as well as
410410
; some common settings and their meanings.
411411
; By default, PHP is set to take action on all errors, notices and warnings EXCEPT
412-
; those related to E_NOTICE and E_STRICT, which together cover best practices and
412+
; those related to E_NOTICE, which together cover best practices and
413413
; recommended coding standards in PHP. For performance reasons, this is the
414414
; recommend error reporting setting. Your production server shouldn't be wasting
415415
; resources complaining about best practices and coding standards. That's what
@@ -419,7 +419,7 @@ memory_limit = 128M
419419
; development and early testing.
420420
;
421421
; Error Level Constants:
422-
; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0)
422+
; E_ALL - All errors and warnings
423423
; E_ERROR - fatal run-time errors
424424
; E_RECOVERABLE_ERROR - almost fatal run-time errors
425425
; E_WARNING - run-time warnings (non-fatal errors)
@@ -429,9 +429,6 @@ memory_limit = 128M
429429
; intentional (e.g., using an uninitialized variable and
430430
; relying on the fact it is automatically initialized to an
431431
; empty string)
432-
; E_STRICT - run-time notices, enable to have PHP suggest changes
433-
; to your code which will ensure the best interoperability
434-
; and forward compatibility of your code
435432
; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
436433
; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
437434
; initial startup
@@ -446,12 +443,11 @@ memory_limit = 128M
446443
;
447444
; Common Values:
448445
; E_ALL (Show all errors, warnings and notices including coding standards.)
449-
; E_ALL & ~E_NOTICE (Show all errors, except for notices)
450-
; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.)
446+
; E_ALL & ~E_NOTICE (Show all errors, except for notices.)
451447
; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors)
452-
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
448+
; Default Value: E_ALL & ~E_NOTICE & ~E_DEPRECATED
453449
; Development Value: E_ALL
454-
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
450+
; Production Value: E_ALL & ~E_DEPRECATED
455451
; http://php.net/error-reporting
456452
error_reporting = E_ALL
457453

php.ini-production

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@
104104
; Production Value: Off
105105

106106
; error_reporting
107-
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
107+
; Default Value: E_ALL & ~E_NOTICE & ~E_DEPRECATED
108108
; Development Value: E_ALL
109-
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
109+
; Production Value: E_ALL & ~E_DEPRECATED
110110

111111
; log_errors
112112
; Default Value: Off
@@ -416,7 +416,7 @@ memory_limit = 128M
416416
; operators. The error level constants are below here for convenience as well as
417417
; some common settings and their meanings.
418418
; By default, PHP is set to take action on all errors, notices and warnings EXCEPT
419-
; those related to E_NOTICE and E_STRICT, which together cover best practices and
419+
; those related to E_NOTICE, which together cover best practices and
420420
; recommended coding standards in PHP. For performance reasons, this is the
421421
; recommend error reporting setting. Your production server shouldn't be wasting
422422
; resources complaining about best practices and coding standards. That's what
@@ -426,7 +426,7 @@ memory_limit = 128M
426426
; development and early testing.
427427
;
428428
; Error Level Constants:
429-
; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0)
429+
; E_ALL - All errors and warnings
430430
; E_ERROR - fatal run-time errors
431431
; E_RECOVERABLE_ERROR - almost fatal run-time errors
432432
; E_WARNING - run-time warnings (non-fatal errors)
@@ -436,9 +436,6 @@ memory_limit = 128M
436436
; intentional (e.g., using an uninitialized variable and
437437
; relying on the fact it is automatically initialized to an
438438
; empty string)
439-
; E_STRICT - run-time notices, enable to have PHP suggest changes
440-
; to your code which will ensure the best interoperability
441-
; and forward compatibility of your code
442439
; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
443440
; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
444441
; initial startup
@@ -453,14 +450,13 @@ memory_limit = 128M
453450
;
454451
; Common Values:
455452
; E_ALL (Show all errors, warnings and notices including coding standards.)
456-
; E_ALL & ~E_NOTICE (Show all errors, except for notices)
457-
; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.)
453+
; E_ALL & ~E_NOTICE (Show all errors, except for notices.)
458454
; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors)
459-
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
455+
; Default Value: E_ALL & ~E_NOTICE & ~E_DEPRECATED
460456
; Development Value: E_ALL
461-
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
457+
; Production Value: E_ALL & ~E_DEPRECATED
462458
; http://php.net/error-reporting
463-
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
459+
error_reporting = E_ALL & ~E_DEPRECATED
464460

465461
; This directive controls whether or not and where PHP will output errors,
466462
; notices and warnings too. Error output is very useful during development, but

run-tests.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ function main()
238238
'open_basedir=',
239239
'disable_functions=',
240240
'output_buffering=Off',
241-
'error_reporting=' . (E_ALL | E_STRICT),
241+
'error_reporting=' . E_ALL,
242242
'display_errors=1',
243243
'display_startup_errors=1',
244244
'log_errors=0',
@@ -1623,7 +1623,7 @@ function run_all_tests_parallel($test_files, $env, $redir_tested) {
16231623
'E_USER_ERROR',
16241624
'E_USER_WARNING',
16251625
'E_USER_NOTICE',
1626-
'E_STRICT',
1626+
'E_STRICT', // TODO Cleanup when removed from Zend Engine.
16271627
'E_RECOVERABLE_ERROR',
16281628
'E_USER_DEPRECATED'
16291629
];

0 commit comments

Comments
 (0)