File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change 169
169
} while (0)
170
170
#endif /* PHP_VERSION_ID < 70300 */
171
171
172
- /* For compatibility with older PHP versions */
173
- #ifndef ZEND_PARSE_PARAMETERS_NONE
174
- #define ZEND_PARSE_PARAMETERS_NONE () \
175
- ZEND_PARSE_PARAMETERS_START(0, 0) \
176
- ZEND_PARSE_PARAMETERS_END()
177
- #endif
178
-
179
172
/* Compatibility macros to override error handling logic */
180
173
#define PHONGO_PARSE_PARAMETERS_START (min_num_args , max_num_args ) \
181
174
do { \
193
186
} \
194
187
while (0)
195
188
189
+ #ifndef ZEND_PARSE_PARAMETERS_NONE
190
+ #define PHONGO_PARSE_PARAMETERS_NONE \
191
+ do { \
192
+ zend_error_handling error_handling; \
193
+ zend_replace_error_handling( \
194
+ EH_THROW, \
195
+ phongo_exception_from_phongo_domain(PHONGO_ERROR_INVALID_ARGUMENT), \
196
+ &error_handling); \
197
+ if (zend_parse_parameters_none() == FAILURE) { \
198
+ zend_restore_error_handling(&error_handling); \
199
+ return; \
200
+ } \
201
+ zend_restore_error_handling(&error_handling); \
202
+ } while (0)
203
+ #else
196
204
#define PHONGO_PARSE_PARAMETERS_NONE \
197
205
do { \
198
206
zend_error_handling error_handling; \
206
214
return; \
207
215
} \
208
216
} while (0)
217
+ #endif
209
218
210
219
void phongo_add_exception_prop (const char * prop , int prop_len , zval * value );
211
220
zend_bool php_phongo_zend_hash_apply_protection_begin (HashTable * ht );
You can’t perform that action at this time.
0 commit comments