File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -4513,28 +4513,27 @@ PHP_METHOD(PharFileInfo, __construct)
45134513}
45144514/* }}} */
45154515
4516- #define PHAR_ENTRY_OBJECT ( ) \
4516+ #define PHAR_ENTRY_OBJECT_EX ( throw ) \
45174517 zval *zobj = ZEND_THIS; \
45184518 phar_entry_object *entry_obj = (phar_entry_object*)((char*)Z_OBJ_P(zobj) - Z_OBJ_P(zobj)->handlers->offset); \
45194519 if (!entry_obj->entry) { \
4520- zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, \
4521- "Cannot call method on an uninitialized PharFileInfo object"); \
4522- RETURN_THROWS(); \
4520+ if (throw) { \
4521+ zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, \
4522+ "Cannot call method on an uninitialized PharFileInfo object"); \
4523+ } \
4524+ return; \
45234525 }
45244526
4527+ #define PHAR_ENTRY_OBJECT () PHAR_ENTRY_OBJECT_EX(true)
4528+
45254529/* {{{ clean up directory-based entry objects */
45264530PHP_METHOD (PharFileInfo , __destruct )
45274531{
4528- zval * zobj = ZEND_THIS ;
4529- phar_entry_object * entry_obj = (phar_entry_object * )((char * )Z_OBJ_P (zobj ) - Z_OBJ_P (zobj )-> handlers -> offset );
4530-
45314532 if (zend_parse_parameters_none () == FAILURE ) {
45324533 RETURN_THROWS ();
45334534 }
45344535
4535- if (!entry_obj -> entry ) {
4536- return ;
4537- }
4536+ PHAR_ENTRY_OBJECT_EX (false);
45384537
45394538 if (entry_obj -> entry -> is_temp_dir ) {
45404539 if (entry_obj -> entry -> filename ) {
You can’t perform that action at this time.
0 commit comments