From 1b2562a3af73f1b0554c73d2f9078acb00eda37b Mon Sep 17 00:00:00 2001 From: Martijn Otto Date: Tue, 17 May 2016 16:14:15 +0200 Subject: Fix crash during initialization --- zend/extensionimpl.cpp | 2 +- zend/functor.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/zend/extensionimpl.cpp b/zend/extensionimpl.cpp index bc29cf1..ef5d33d 100644 --- a/zend/extensionimpl.cpp +++ b/zend/extensionimpl.cpp @@ -364,7 +364,7 @@ bool ExtensionImpl::initialize(int module_number TSRMLS_DC) }); // last entry should be set to all zero's - memset(&_ini[i], 0, sizeof(zend_ini_entry)); + memset(&_ini[i], 0, sizeof(_ini[i])); // register ini entries in Zend core zend_register_ini_entries(_ini.get(), module_number TSRMLS_CC); diff --git a/zend/functor.cpp b/zend/functor.cpp index 7d0404b..866fcea 100644 --- a/zend/functor.cpp +++ b/zend/functor.cpp @@ -6,7 +6,7 @@ * @author Emiel Bruijntjes * @copyright 2015 Copernica BV */ - + /** * Dependencies */ @@ -31,10 +31,10 @@ void Functor::initialize(TSRMLS_D) { // leap out if the class entry is already set if (_entry) return; - + // construct functor object static std::unique_ptr functor(new Class("PhpCpp::Functor")); - + // initialize the functor class _entry = functor->implementation()->initialize(functor.get(), "" TSRMLS_CC); } @@ -48,7 +48,7 @@ void Functor::shutdown(TSRMLS_D) // we forget the entry _entry = nullptr; } - + /** * End of namespace */ -- cgit v1.2.3