Skip to content

Commit b3ae873

Browse files
remicolletpierredup
authored andcommitted
Fix #1 PHP 8.0 build
1 parent f199ab9 commit b3ae873

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

aspect.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ZEND_DECLARE_MODULE_GLOBALS(aspect)
2828

2929
static void (*original_zend_execute_ex)(zend_execute_data *execute_data);
3030

31-
ZEND_API static void aspect_execute_ex(zend_execute_data *execute_data);
31+
static void aspect_execute_ex(zend_execute_data *execute_data);
3232

3333
static void handle_memoize_functions(zend_execute_data *execute_data);
3434

@@ -111,7 +111,11 @@ static void aspect_execute_ex(zend_execute_data *execute_data) {
111111
zend_type return_type = ret_info->type;
112112
uint32_t type_mask = return_type.type_mask;
113113

114-
if (type_mask & ((uint32_t)1 << IS_VOID) || type_mask & ((uint32_t)1 << IS_NEVER)) {
114+
if (type_mask & ((uint32_t)1 << IS_VOID)
115+
#if PHP_VERSION_ID >= 80100
116+
|| type_mask & ((uint32_t)1 << IS_NEVER)
117+
#endif
118+
) {
115119
// cannot memoize functions with void or never return types
116120
// @TODO: Should this be an error/exception?
117121
original_zend_execute_ex(execute_data);

0 commit comments

Comments
 (0)