Skip to content

Commit

Permalink
moved setting the ce_flags a bit up so that we no longer need php7.2 …
Browse files Browse the repository at this point in the history
…/ php7.4 difference
  • Loading branch information
EmielBruijntjes committed Jun 14, 2022
1 parent 088e402 commit c253505
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions zend/classimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1366,6 +1366,9 @@ 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 @@ -1452,13 +1455,6 @@ zend_class_entry *ClassImpl::initialize(ClassBase *base, const std::string &pref
// install the doc_comment
_entry->info.user.doc_comment = _self;

// set access types flags for class
#if PHP_VERSION_ID >= 70400
_entry->ce_flags |= (int)_type;
#else
_entry->ce_flags = (int)_type;
#endif

// declare all member variables
for (auto &member : _members) member->initialize(_entry);

Expand Down

0 comments on commit c253505

Please sign in to comment.