Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for toggling display_errors in php.ini #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

djelenc
Copy link

@djelenc djelenc commented Apr 5, 2019

This is some nice work.

During development, I prefer to set display_errors = On in php.ini to enable showing PHP syntax errors. So I created a small patch that adds support for toggling it on by using environment variable DISPLAY_ERRORS. Feel free to use it.

@@ -28,6 +28,13 @@ fi
# enable php short tags:
/bin/sed -i "s/short_open_tag\ \=\ Off/short_open_tag\ \=\ On/g" /etc/php/7.0/apache2/php.ini

# display PHP errors:
if [ $DISPLAY_ERRORS ]; then
/bin/sed -i "s/display_errors\ \=\ Off/display_errors\ \=\ On/g" /etc/php/7.0/apache2/php.ini
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would enable display_errors even if DISPLAY_ERRORS=no. We should use exportBoolean for this instead.

Copy link
Owner

@fauria fauria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a flag that should be kept disabled by default, we should make use of exportBoolean instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants