!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
- zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
+ int severity;
+ char *verb;
+ if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
+ severity = E_STRICT;
+ verb = "should not";
+ } else {
+ /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
+ severity = E_ERROR;
+ verb = "cannot";
+ }
+ zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
}
if ((EX(object) = EG(This))) {
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
- zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
+ int severity;
+ char *verb;
+ if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
+ severity = E_STRICT;
+ verb = "should not";
+ } else {
+ /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
+ severity = E_ERROR;
+ verb = "cannot";
+ }
+ zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
}
if ((EX(object) = EG(This))) {
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
- zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
+ int severity;
+ char *verb;
+ if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
+ severity = E_STRICT;
+ verb = "should not";
+ } else {
+ /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
+ severity = E_ERROR;
+ verb = "cannot";
+ }
+ zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
}
if ((EX(object) = EG(This))) {
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
- zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
+ int severity;
+ char *verb;
+ if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
+ severity = E_STRICT;
+ verb = "should not";
+ } else {
+ /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
+ severity = E_ERROR;
+ verb = "cannot";
+ }
+ zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
}
if ((EX(object) = EG(This))) {
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
- zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
+ int severity;
+ char *verb;
+ if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
+ severity = E_STRICT;
+ verb = "should not";
+ } else {
+ /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
+ severity = E_ERROR;
+ verb = "cannot";
+ }
+ zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
}
if ((EX(object) = EG(This))) {
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
- zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
+ int severity;
+ char *verb;
+ if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
+ severity = E_STRICT;
+ verb = "should not";
+ } else {
+ /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
+ severity = E_ERROR;
+ verb = "cannot";
+ }
+ zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
}
if ((EX(object) = EG(This))) {