summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2018-01-17 19:43:11 +0100
committerjvoisin2018-01-17 19:43:11 +0100
commite2b74815a4bdb8fde177d4dce2e3aa1ba3792617 (patch)
tree9e7c6df08696a01ab507006e77ec4d0c765cace7
parentb213c8e08b5624da9bb69dd05e132e247bab3082 (diff)
Bump a bit the coverage
-rw-r--r--src/sp_disabled_functions.c3
-rw-r--r--src/tests/broken_conf_eval.phpt9
-rw-r--r--src/tests/config/broken_conf_eval.ini1
3 files changed, 11 insertions, 2 deletions
diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c
index 5619e1f..f5051df 100644
--- a/src/sp_disabled_functions.c
+++ b/src/sp_disabled_functions.c
@@ -193,8 +193,7 @@ static bool is_param_matching(zend_execute_data* execute_data,
193 if (arg_value) { 193 if (arg_value) {
194 *arg_value_str = sp_convert_to_string(arg_value); 194 *arg_value_str = sp_convert_to_string(arg_value);
195 if (config_node->param_type) { // Are we matching on the `type`? 195 if (config_node->param_type) { // Are we matching on the `type`?
196 if (config_node->param_type && 196 if (config_node->param_type == Z_TYPE_P(arg_value)) {
197 config_node->param_type == Z_TYPE_P(arg_value)) {
198 return true; 197 return true;
199 } 198 }
200 } else if (Z_TYPE_P(arg_value) == IS_ARRAY) { 199 } else if (Z_TYPE_P(arg_value) == IS_ARRAY) {
diff --git a/src/tests/broken_conf_eval.phpt b/src/tests/broken_conf_eval.phpt
new file mode 100644
index 0000000..4dc5312
--- /dev/null
+++ b/src/tests/broken_conf_eval.phpt
@@ -0,0 +1,9 @@
1--TEST--
2Broken configuration for eval
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/broken_conf_eval.ini
7--FILE--
8--EXPECT--
9[snuffleupagus][0.0.0.0][error][error] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1.
diff --git a/src/tests/config/broken_conf_eval.ini b/src/tests/config/broken_conf_eval.ini
new file mode 100644
index 0000000..80ef7e5
--- /dev/null
+++ b/src/tests/config/broken_conf_eval.ini
@@ -0,0 +1 @@
sp.eval_blacklist.list("cos,sin