Skip to content

Commit

Permalink
Bail early in case of invalid config in PHP_RINIT_
Browse files Browse the repository at this point in the history
  • Loading branch information
jvoisin committed Jan 26, 2024
1 parent 8ea689e commit c505b1c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/snuffleupagus.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,10 @@ PHP_RINIT_FUNCTION(snuffleupagus) {
if (!SPG(allow_broken_configuration)) {
if (SPG(is_config_valid) == SP_CONFIG_INVALID) {
sp_log_err("config", "Invalid configuration file");
return SUCCESS;
} else if (SPG(is_config_valid) == SP_CONFIG_NONE) {
sp_log_warn("config", "No configuration specified via sp.configuration_file");
return SUCCESS;
}
}

Expand Down

0 comments on commit c505b1c

Please sign in to comment.