Skip to content

Commit c253505

Browse files
moved setting the ce_flags a bit up so that we no longer need php7.2 / php7.4 difference
1 parent 088e402 commit c253505

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

zend/classimpl.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,6 +1366,9 @@ zend_class_entry *ClassImpl::initialize(ClassBase *base, const std::string &pref
13661366
// initialize the class entry
13671367
INIT_CLASS_ENTRY_EX(entry, _name.c_str(), _name.size(), entries());
13681368

1369+
// set access types flags for class
1370+
_entry->ce_flags |= (int)_type;
1371+
13691372
// we need a special constructor, but only for real classes, not for interfaces.
13701373
// (in fact: from php 7.4 onwards the create_object method is part of union
13711374
// together with the interface_gets_implemented method, which causes a crash
@@ -1452,13 +1455,6 @@ zend_class_entry *ClassImpl::initialize(ClassBase *base, const std::string &pref
14521455
// install the doc_comment
14531456
_entry->info.user.doc_comment = _self;
14541457

1455-
// set access types flags for class
1456-
#if PHP_VERSION_ID >= 70400
1457-
_entry->ce_flags |= (int)_type;
1458-
#else
1459-
_entry->ce_flags = (int)_type;
1460-
#endif
1461-
14621458
// declare all member variables
14631459
for (auto &member : _members) member->initialize(_entry);
14641460

0 commit comments

Comments
 (0)