Skip to content

Commit 2d47447

Browse files
committed
Add a few missing RETURN_THROWS();
Only PharFileInfo::compress() really needs it though.
1 parent 635303a commit 2d47447

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ext/phar/phar_object.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4544,8 +4544,8 @@ PHP_METHOD(PharFileInfo, isCompressed)
45444544
case PHAR_ENT_COMPRESSED_BZ2:
45454545
RETURN_BOOL(entry_obj->entry->flags & PHAR_ENT_COMPRESSED_BZ2);
45464546
default:
4547-
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, \
4548-
"Unknown compression type specified"); \
4547+
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Unknown compression type specified");
4548+
RETURN_THROWS();
45494549
}
45504550
}
45514551
/* }}} */
@@ -4568,8 +4568,8 @@ PHP_METHOD(PharFileInfo, getCRC32)
45684568
if (entry_obj->entry->is_crc_checked) {
45694569
RETURN_LONG(entry_obj->entry->crc32);
45704570
} else {
4571-
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, \
4572-
"Phar entry was not CRC checked"); \
4571+
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Phar entry was not CRC checked");
4572+
RETURN_THROWS();
45734573
}
45744574
}
45754575
/* }}} */
@@ -4957,8 +4957,8 @@ PHP_METHOD(PharFileInfo, compress)
49574957
entry_obj->entry->flags |= PHAR_ENT_COMPRESSED_BZ2;
49584958
break;
49594959
default:
4960-
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, \
4961-
"Unknown compression type specified"); \
4960+
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Unknown compression type specified");
4961+
RETURN_THROWS();
49624962
}
49634963

49644964
entry_obj->entry->phar->is_modified = 1;

0 commit comments

Comments
 (0)