Skip to content

Commit

Permalink
fixed another mess up with the class access modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
EmielBruijntjes committed Jun 14, 2022
1 parent c253505 commit 7a2212b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ INSTALL_LIB = ${INSTALL_PREFIX}/lib
#

SONAME = 2.3
VERSION = 2.3.3
VERSION = 2.3.4


#
Expand Down
8 changes: 4 additions & 4 deletions zend/classimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1366,9 +1366,6 @@ zend_class_entry *ClassImpl::initialize(ClassBase *base, const std::string &pref
// initialize the class entry
INIT_CLASS_ENTRY_EX(entry, _name.c_str(), _name.size(), entries());

// set access types flags for class
_entry->ce_flags |= (int)_type;

// we need a special constructor, but only for real classes, not for interfaces.
// (in fact: from php 7.4 onwards the create_object method is part of union
// together with the interface_gets_implemented method, which causes a crash
Expand Down Expand Up @@ -1424,7 +1421,7 @@ zend_class_entry *ClassImpl::initialize(ClassBase *base, const std::string &pref
// register the class
_entry = zend_register_internal_class(&entry);
}

// register the interfaces
for (auto &interface : _interfaces)
{
Expand All @@ -1439,6 +1436,9 @@ zend_class_entry *ClassImpl::initialize(ClassBase *base, const std::string &pref
if (_base->traversable()) zend_class_implements(_entry, 1, zend_ce_traversable);
if (_base->serializable()) zend_class_implements(_entry, 1, zend_ce_serializable);

// instal the right modifier (to make the class an interface, abstract class, etc)
_entry->ce_flags |= uint64_t(_type);

// this pointer has to be copied to temporary pointer, as &this causes compiler error
ClassImpl *impl = this;

Expand Down

0 comments on commit 7a2212b

Please sign in to comment.