CopernicaMarketingSoftware / PHP-CPP

Library to build PHP extensions with C++

Home Page:http://www.php-cpp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Too few args to function zend_check_property_access in release 2.1.4

VBruceHunt opened this issue · comments

Error occurs using g++ version (Raspbian 8.3.0-6+rpi1) 8.3.0 on Rasberry Pi 4, 4GB. Making PHP-CPP-2.1.4 against PHP 7.4.14. Here is error:
g++ -Wall -c -std=c++11 -fvisibility=hidden -DBUILDING_PHPCPP -Wno-write-strings -MD -g php-config --includes-fpic -o shared/zend/value.o zend/value.cpp zend/value.cpp: In member function ‘bool Php::Value::contains(const char*, int) const’: zend/value.cpp:1506:72: error: too few arguments to function ‘int zend_check_property_access(zend_object*, zend_string*, zend_bool)’ if (zend_check_property_access(Z_OBJ_P(_val), String(key, size)) == FAILURE) return false; ^ In file included from /usr/local/include/php/Zend/zend.h:355, from /usr/local/include/php/main/php.h:33, from zend/includes.h:40, from zend/value.cpp:27: /usr/local/include/php/Zend/zend_object_handlers.h:229:14: note: declared here ZEND_API int zend_check_property_access(zend_object *zobj, zend_string *prop_info_name, zend_bool is_dynamic); ^~~~~~~~~~~~~~~~~~~~~~~~~~ make: *** [Makefile:219: shared/zend/value.o] Error 1
The following change was made that appears to fix this error on line 1506 of zend/value.cpp:
if (zend_check_property_access(Z_OBJ_P(_val), String(key, size), 1) == FAILURE) return false; //vbh21114
The missing parameter, is_dynamic, is set to 1 presuming that the object is dynamic.

Fixed in PHP-CPP 2.3.0 (da21e3a)