Check access level for static methods call.
Todas las comprobaciones han sido exitosas
The build was successful.
Todas las comprobaciones han sido exitosas
The build was successful.
Este commit está contenido en:
padre
7732a239ff
commit
1c0ba22c48
@ -4336,6 +4336,9 @@ static sxi32 VmByteCodeExec(
|
||||
} else if((pMeth->iFlags & PH7_CLASS_ATTR_STATIC) == 0) {
|
||||
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "Attempt to call statically a non-static method '%z::%z()'",
|
||||
&pClass->sName, &sName);
|
||||
} else if(!VmClassMemberAccess(&(*pVm), pClass, pMeth->iProtection)) {
|
||||
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "Method '%z::%z()' is inaccessible due to its protection level",
|
||||
&pClass->sName, &sName);
|
||||
} else {
|
||||
/* Push method name on the stack */
|
||||
PH7_MemObjRelease(pTos);
|
||||
|
Cargando…
x
Referencia en una nueva incidencia
Block a user