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 @@ -4518,28 +4518,27 @@ PHP_METHOD(PharFileInfo, __construct)
4518
4518
}
4519
4519
/* }}} */
4520
4520
4521
- #define PHAR_ENTRY_OBJECT ( ) \
4521
+ #define PHAR_ENTRY_OBJECT_EX ( throw ) \
4522
4522
zval *zobj = ZEND_THIS; \
4523
4523
phar_entry_object *entry_obj = (phar_entry_object*)((char*)Z_OBJ_P(zobj) - Z_OBJ_P(zobj)->handlers->offset); \
4524
4524
if (!entry_obj->entry) { \
4525
- zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, \
4526
- "Cannot call method on an uninitialized PharFileInfo object"); \
4527
- RETURN_THROWS(); \
4525
+ if (throw) { \
4526
+ zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, \
4527
+ "Cannot call method on an uninitialized PharFileInfo object"); \
4528
+ } \
4529
+ return; \
4528
4530
}
4529
4531
4532
+ #define PHAR_ENTRY_OBJECT () PHAR_ENTRY_OBJECT_EX(true)
4533
+
4530
4534
/* {{{ clean up directory-based entry objects */
4531
4535
PHP_METHOD (PharFileInfo , __destruct )
4532
4536
{
4533
- zval * zobj = ZEND_THIS ;
4534
- phar_entry_object * entry_obj = (phar_entry_object * )((char * )Z_OBJ_P (zobj ) - Z_OBJ_P (zobj )-> handlers -> offset );
4535
-
4536
4537
if (zend_parse_parameters_none () == FAILURE ) {
4537
4538
RETURN_THROWS ();
4538
4539
}
4539
4540
4540
- if (!entry_obj -> entry ) {
4541
- return ;
4542
- }
4541
+ PHAR_ENTRY_OBJECT_EX (false);
4543
4542
4544
4543
if (entry_obj -> entry -> is_temp_dir ) {
4545
4544
if (entry_obj -> entry -> filename ) {
You can’t perform that action at this time.
0 commit comments