diff options
| author | jvoisin | 2020-08-12 08:48:59 +0000 |
|---|---|---|
| committer | GitHub | 2020-08-12 10:48:59 +0200 |
| commit | a0d21a189cf04bb963dce93dcbd0bd9694584a0b (patch) | |
| tree | 59fa646b7536fbef7de42eb111c82df592262a12 /src/php_snuffleupagus.h | |
| parent | f3360c4de72b6735bc5f5873dd671c2e56292ce6 (diff) | |
Allow empty configuration (#342)
This commit allows php to run (with a warning) if there
is no specified snuffleupagus configuration,
instead of refusing to start.
Diffstat (limited to '')
| -rw-r--r-- | src/php_snuffleupagus.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/php_snuffleupagus.h b/src/php_snuffleupagus.h index 0849d36..6b0e210 100644 --- a/src/php_snuffleupagus.h +++ b/src/php_snuffleupagus.h | |||
| @@ -62,6 +62,10 @@ typedef void (*zif_handler)(INTERNAL_FUNCTION_PARAMETERS); | |||
| 62 | #define TSRMLS_C | 62 | #define TSRMLS_C |
| 63 | #endif | 63 | #endif |
| 64 | 64 | ||
| 65 | #define SP_CONFIG_VALID 1 | ||
| 66 | #define SP_CONFIG_INVALID 0 | ||
| 67 | #define SP_CONFIG_NONE -1 | ||
| 68 | |||
| 65 | #include "sp_pcre_compat.h" | 69 | #include "sp_pcre_compat.h" |
| 66 | #include "sp_list.h" | 70 | #include "sp_list.h" |
| 67 | #include "sp_tree.h" | 71 | #include "sp_tree.h" |
| @@ -101,7 +105,7 @@ extern zend_module_entry snuffleupagus_module_entry; | |||
| 101 | ZEND_BEGIN_MODULE_GLOBALS(snuffleupagus) | 105 | ZEND_BEGIN_MODULE_GLOBALS(snuffleupagus) |
| 102 | size_t in_eval; | 106 | size_t in_eval; |
| 103 | sp_config config; | 107 | sp_config config; |
| 104 | bool is_config_valid; | 108 | int is_config_valid; // 1 = valid, 0 = invalid, -1 = none |
| 105 | bool allow_broken_configuration; | 109 | bool allow_broken_configuration; |
| 106 | HashTable *disabled_functions_hook; | 110 | HashTable *disabled_functions_hook; |
| 107 | HashTable *sp_internal_functions_hook; | 111 | HashTable *sp_internal_functions_hook; |
