summaryrefslogtreecommitdiff
path: root/src/php_snuffleupagus.h
diff options
context:
space:
mode:
authorjvoisin2020-08-12 08:48:59 +0000
committerGitHub2020-08-12 10:48:59 +0200
commita0d21a189cf04bb963dce93dcbd0bd9694584a0b (patch)
tree59fa646b7536fbef7de42eb111c82df592262a12 /src/php_snuffleupagus.h
parentf3360c4de72b6735bc5f5873dd671c2e56292ce6 (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.h6
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;
101ZEND_BEGIN_MODULE_GLOBALS(snuffleupagus) 105ZEND_BEGIN_MODULE_GLOBALS(snuffleupagus)
102size_t in_eval; 106size_t in_eval;
103sp_config config; 107sp_config config;
104bool is_config_valid; 108int is_config_valid; // 1 = valid, 0 = invalid, -1 = none
105bool allow_broken_configuration; 109bool allow_broken_configuration;
106HashTable *disabled_functions_hook; 110HashTable *disabled_functions_hook;
107HashTable *sp_internal_functions_hook; 111HashTable *sp_internal_functions_hook;