Skip to content

Commit

Permalink
Fix zend_write booking type
Browse files Browse the repository at this point in the history
The signature was changed in PHP8: php/php-src@e15409b
  • Loading branch information
jvoisin committed Nov 29, 2020
1 parent ea7c76b commit 69719e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/sp_disabled_functions.c
Expand Up @@ -626,7 +626,11 @@ int hook_disabled_functions(void) {

zend_write_func_t zend_write_default = NULL;

#if PHP_VERSION_ID >= 80000
size_t hook_echo(const char* str, size_t str_length) {
#else
int hook_echo(const char* str, size_t str_length) {
#endif
zend_string* zs = zend_string_init(str, str_length, 0);

should_disable_ht(
Expand Down
6 changes: 5 additions & 1 deletion src/sp_disabled_functions.h
Expand Up @@ -3,8 +3,12 @@

extern zend_write_func_t zend_write_default;

int hook_disabled_functions(void);
#if PHP_VERSION_ID >= 80000
size_t hook_echo(const char *, size_t);
#else
int hook_echo(const char *, size_t);
#endif
int hook_disabled_functions(void);
void should_disable_ht(zend_execute_data *, const char *, const zend_string *,
const char *, const sp_list_node *, const HashTable *);
void should_drop_on_ret_ht(const zval *, const char *,
Expand Down

0 comments on commit 69719e4

Please sign in to comment.