Skip to content

Commit

Permalink
Merge 497db8e into c871474
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet committed Aug 24, 2020
2 parents c871474 + 497db8e commit 104e689
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion psr_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ static void php_psr_PsrLogAbstractLogger_log(const char * level_str, size_t leve
zval * _this_zval = getThis();
zval * message;
zval * context = NULL;
zend_class_entry * expected_ce = NULL; // PsrLogAbstractLogger_ce_ptr
zval fname = {0};
zval fparams[3];

Expand Down Expand Up @@ -252,7 +251,11 @@ PHP_METHOD(PsrLogLoggerAwareTrait, setLogger)
Z_PARAM_OBJECT_OF_CLASS(logger, PsrLogLoggerInterface_ce_ptr)
ZEND_PARSE_PARAMETERS_END();

#if PHP_VERSION_ID < 80000
zend_update_property(Z_OBJCE_P(_this_zval), _this_zval, "logger", sizeof("logger")-1, logger);
#else
zend_update_property(Z_OBJCE_P(_this_zval), Z_OBJ_P(_this_zval), "logger", sizeof("logger")-1, logger);
#endif
}

static zend_function_entry PsrLogLoggerAwareTrait_methods[] = {
Expand Down

0 comments on commit 104e689

Please sign in to comment.