Skip to content

Commit 30f07e5

Browse files
authored
Merge pull request docker-library#421 from infosiftr/error_reporting
Adjust the value of "error_reporting" to be the semantic equivalent of the suggested "4339" and add "E_PARSE"
2 parents fc7f07c + c9f1ca1 commit 30f07e5

File tree

15 files changed

+60
-30
lines changed

15 files changed

+60
-30
lines changed

Dockerfile-alpine.template

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ RUN { \
4848
echo 'opcache.revalidate_freq=2'; \
4949
echo 'opcache.fast_shutdown=1'; \
5050
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
51-
# https://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging
51+
# https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging
5252
RUN { \
53-
echo 'error_reporting = 4339'; \
53+
# https://www.php.net/manual/en/errorfunc.constants.php
54+
# https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670
55+
echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \
5456
echo 'display_errors = Off'; \
5557
echo 'display_startup_errors = Off'; \
5658
echo 'log_errors = On'; \

Dockerfile-cli.template

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ RUN set -ex; \
3333

3434
# set recommended PHP.ini settings
3535
# excluding opcache due https://github.com/docker-library/wordpress/issues/407
36-
# https://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging
36+
# https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging
3737
RUN { \
38-
echo 'error_reporting = 4339'; \
38+
# https://www.php.net/manual/en/errorfunc.constants.php
39+
# https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670
40+
echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \
3941
echo 'display_errors = Off'; \
4042
echo 'display_startup_errors = Off'; \
4143
echo 'log_errors = On'; \

Dockerfile-debian.template

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ RUN { \
4848
echo 'opcache.revalidate_freq=2'; \
4949
echo 'opcache.fast_shutdown=1'; \
5050
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
51-
# https://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging
51+
# https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging
5252
RUN { \
53-
echo 'error_reporting = 4339'; \
53+
# https://www.php.net/manual/en/errorfunc.constants.php
54+
# https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670
55+
echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \
5456
echo 'display_errors = Off'; \
5557
echo 'display_startup_errors = Off'; \
5658
echo 'log_errors = On'; \

php7.1/apache/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ RUN { \
4747
echo 'opcache.revalidate_freq=2'; \
4848
echo 'opcache.fast_shutdown=1'; \
4949
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
50-
# https://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging
50+
# https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging
5151
RUN { \
52-
echo 'error_reporting = 4339'; \
52+
# https://www.php.net/manual/en/errorfunc.constants.php
53+
# https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670
54+
echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \
5355
echo 'display_errors = Off'; \
5456
echo 'display_startup_errors = Off'; \
5557
echo 'log_errors = On'; \

php7.1/cli/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ RUN set -ex; \
3232

3333
# set recommended PHP.ini settings
3434
# excluding opcache due https://github.com/docker-library/wordpress/issues/407
35-
# https://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging
35+
# https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging
3636
RUN { \
37-
echo 'error_reporting = 4339'; \
37+
# https://www.php.net/manual/en/errorfunc.constants.php
38+
# https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670
39+
echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \
3840
echo 'display_errors = Off'; \
3941
echo 'display_startup_errors = Off'; \
4042
echo 'log_errors = On'; \

php7.1/fpm-alpine/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ RUN { \
4747
echo 'opcache.revalidate_freq=2'; \
4848
echo 'opcache.fast_shutdown=1'; \
4949
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
50-
# https://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging
50+
# https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging
5151
RUN { \
52-
echo 'error_reporting = 4339'; \
52+
# https://www.php.net/manual/en/errorfunc.constants.php
53+
# https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670
54+
echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \
5355
echo 'display_errors = Off'; \
5456
echo 'display_startup_errors = Off'; \
5557
echo 'log_errors = On'; \

php7.1/fpm/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ RUN { \
4747
echo 'opcache.revalidate_freq=2'; \
4848
echo 'opcache.fast_shutdown=1'; \
4949
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
50-
# https://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging
50+
# https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging
5151
RUN { \
52-
echo 'error_reporting = 4339'; \
52+
# https://www.php.net/manual/en/errorfunc.constants.php
53+
# https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670
54+
echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \
5355
echo 'display_errors = Off'; \
5456
echo 'display_startup_errors = Off'; \
5557
echo 'log_errors = On'; \

php7.2/apache/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ RUN { \
4747
echo 'opcache.revalidate_freq=2'; \
4848
echo 'opcache.fast_shutdown=1'; \
4949
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
50-
# https://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging
50+
# https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging
5151
RUN { \
52-
echo 'error_reporting = 4339'; \
52+
# https://www.php.net/manual/en/errorfunc.constants.php
53+
# https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670
54+
echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \
5355
echo 'display_errors = Off'; \
5456
echo 'display_startup_errors = Off'; \
5557
echo 'log_errors = On'; \

php7.2/cli/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ RUN set -ex; \
3232

3333
# set recommended PHP.ini settings
3434
# excluding opcache due https://github.com/docker-library/wordpress/issues/407
35-
# https://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging
35+
# https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging
3636
RUN { \
37-
echo 'error_reporting = 4339'; \
37+
# https://www.php.net/manual/en/errorfunc.constants.php
38+
# https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670
39+
echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \
3840
echo 'display_errors = Off'; \
3941
echo 'display_startup_errors = Off'; \
4042
echo 'log_errors = On'; \

php7.2/fpm-alpine/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ RUN { \
4747
echo 'opcache.revalidate_freq=2'; \
4848
echo 'opcache.fast_shutdown=1'; \
4949
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
50-
# https://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging
50+
# https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging
5151
RUN { \
52-
echo 'error_reporting = 4339'; \
52+
# https://www.php.net/manual/en/errorfunc.constants.php
53+
# https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670
54+
echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \
5355
echo 'display_errors = Off'; \
5456
echo 'display_startup_errors = Off'; \
5557
echo 'log_errors = On'; \

php7.2/fpm/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ RUN { \
4747
echo 'opcache.revalidate_freq=2'; \
4848
echo 'opcache.fast_shutdown=1'; \
4949
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
50-
# https://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging
50+
# https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging
5151
RUN { \
52-
echo 'error_reporting = 4339'; \
52+
# https://www.php.net/manual/en/errorfunc.constants.php
53+
# https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670
54+
echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \
5355
echo 'display_errors = Off'; \
5456
echo 'display_startup_errors = Off'; \
5557
echo 'log_errors = On'; \

php7.3/apache/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ RUN { \
4848
echo 'opcache.revalidate_freq=2'; \
4949
echo 'opcache.fast_shutdown=1'; \
5050
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
51-
# https://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging
51+
# https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging
5252
RUN { \
53-
echo 'error_reporting = 4339'; \
53+
# https://www.php.net/manual/en/errorfunc.constants.php
54+
# https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670
55+
echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \
5456
echo 'display_errors = Off'; \
5557
echo 'display_startup_errors = Off'; \
5658
echo 'log_errors = On'; \

php7.3/cli/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ RUN set -ex; \
3333

3434
# set recommended PHP.ini settings
3535
# excluding opcache due https://github.com/docker-library/wordpress/issues/407
36-
# https://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging
36+
# https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging
3737
RUN { \
38-
echo 'error_reporting = 4339'; \
38+
# https://www.php.net/manual/en/errorfunc.constants.php
39+
# https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670
40+
echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \
3941
echo 'display_errors = Off'; \
4042
echo 'display_startup_errors = Off'; \
4143
echo 'log_errors = On'; \

php7.3/fpm-alpine/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ RUN { \
4848
echo 'opcache.revalidate_freq=2'; \
4949
echo 'opcache.fast_shutdown=1'; \
5050
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
51-
# https://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging
51+
# https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging
5252
RUN { \
53-
echo 'error_reporting = 4339'; \
53+
# https://www.php.net/manual/en/errorfunc.constants.php
54+
# https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670
55+
echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \
5456
echo 'display_errors = Off'; \
5557
echo 'display_startup_errors = Off'; \
5658
echo 'log_errors = On'; \

php7.3/fpm/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ RUN { \
4848
echo 'opcache.revalidate_freq=2'; \
4949
echo 'opcache.fast_shutdown=1'; \
5050
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
51-
# https://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging
51+
# https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging
5252
RUN { \
53-
echo 'error_reporting = 4339'; \
53+
# https://www.php.net/manual/en/errorfunc.constants.php
54+
# https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670
55+
echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \
5456
echo 'display_errors = Off'; \
5557
echo 'display_startup_errors = Off'; \
5658
echo 'log_errors = On'; \

0 commit comments

Comments
 (0)