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)
4513
4513
}
4514
4514
/* }}} */
4515
4515
4516
- #define PHAR_ENTRY_OBJECT ( ) \
4516
+ #define PHAR_ENTRY_OBJECT_EX ( throw ) \
4517
4517
zval *zobj = ZEND_THIS; \
4518
4518
phar_entry_object *entry_obj = (phar_entry_object*)((char*)Z_OBJ_P(zobj) - Z_OBJ_P(zobj)->handlers->offset); \
4519
4519
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; \
4523
4525
}
4524
4526
4527
+ #define PHAR_ENTRY_OBJECT () PHAR_ENTRY_OBJECT_EX(true)
4528
+
4525
4529
/* {{{ clean up directory-based entry objects */
4526
4530
PHP_METHOD (PharFileInfo , __destruct )
4527
4531
{
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
-
4531
4532
if (zend_parse_parameters_none () == FAILURE ) {
4532
4533
RETURN_THROWS ();
4533
4534
}
4534
4535
4535
- if (!entry_obj -> entry ) {
4536
- return ;
4537
- }
4536
+ PHAR_ENTRY_OBJECT_EX (false);
4538
4537
4539
4538
if (entry_obj -> entry -> is_temp_dir ) {
4540
4539
if (entry_obj -> entry -> filename ) {
You can’t perform that action at this time.
0 commit comments