From ac574d3c72b080a931e16b4152e8e95cecd12512 Mon Sep 17 00:00:00 2001 From: Nils VAN ZUIJLEN Date: Wed, 28 Apr 2021 15:32:43 +0200 Subject: [PATCH] Also remove debug flags on upgrade --- scripts/upgrade | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 2dde7ab..f29f28d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -112,6 +112,17 @@ ynh_add_fpm_config #================================================= # SPECIFIC UPGRADE +#================================================= +# DEACTIVATE DEBUG MODE +#================================================= + +ynh_replace_string --match_string="defined('YII_DEBUG') or define('YII_DEBUG', true);"\ + --replace_string="// defined('YII_DEBUG') or define('YII_DEBUG', true);"\ + --target_file="$final_path/index.php" +ynh_replace_string --match_string="defined('YII_ENV') or define('YII_ENV', 'dev');"\ + --replace_string="// defined('YII_ENV') or define('YII_ENV', 'dev');"\ + --target_file="$final_path/index.php" + #================================================= # MIGRATE DATABASE #=================================================