diff options
Diffstat (limited to 'sapi/phpdbg/phpdbg_bp.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_bp.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c index b56c842dcf..a7253250d6 100644 --- a/sapi/phpdbg/phpdbg_bp.c +++ b/sapi/phpdbg/phpdbg_bp.c @@ -232,7 +232,7 @@ PHPDBG_API void phpdbg_export_breakpoints_to_string(char **str) /* {{{ */ } ZEND_HASH_FOREACH_END(); } - if (!(*str)[0]) { + if ((*str) && !(*str)[0]) { *str = NULL; } } /* }}} */ @@ -813,6 +813,21 @@ static inline void phpdbg_create_conditional_break(phpdbg_breakcond_t *brake, co uint32_t cops = CG(compiler_options); zval pv; + switch (param->type) { + case STR_PARAM: + case NUMERIC_FUNCTION_PARAM: + case METHOD_PARAM: + case NUMERIC_METHOD_PARAM: + case FILE_PARAM: + case ADDR_PARAM: + /* do nothing */ + break; + + default: + phpdbg_error("eval", "type=\"invalidparameter\"", "Invalid parameter type for conditional breakpoint"); + return; + } + PHPDBG_BREAK_INIT(new_break, PHPDBG_BREAK_COND); new_break.hash = hash; |