Skip to content

Commit 725148c

Browse files
committed
- Allow building with 5.1 (not all works thenperfectly though)
1 parent 66398d4 commit 725148c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ext/phar/phar_object.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,12 +1156,18 @@ zend_function_entry phar_exception_methods[] = {
11561156
#define REGISTER_PHAR_CLASS_CONST_LONG(class_name, const_name, value) \
11571157
zend_declare_class_constant_long(class_name, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC);
11581158

1159+
#if PHP_VERSION_ID < 50200
1160+
# define phar_exception_get_default() zend_exception_get_default()
1161+
#else
1162+
# define phar_exception_get_default() zend_exception_get_default(TSRMLS_C)
1163+
#endif
1164+
11591165
void phar_object_init(TSRMLS_D) /* {{{ */
11601166
{
11611167
zend_class_entry ce;
11621168

11631169
INIT_CLASS_ENTRY(ce, "PharException", phar_exception_methods);
1164-
phar_ce_PharException = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
1170+
phar_ce_PharException = zend_register_internal_class_ex(&ce, phar_exception_get_default(), NULL TSRMLS_CC);
11651171

11661172
#if HAVE_SPL
11671173
INIT_CLASS_ENTRY(ce, "Phar", php_archive_methods);

0 commit comments

Comments
 (0)