Do not typecast NULL to StdClass.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2019-04-03 09:34:32 +02:00
parent 4467ca6dce
commit 9acd6fbcb2
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 6 additions and 1 deletions

View File

@ -580,7 +580,12 @@ PH7_PRIVATE sxi32 PH7_MemObjToHashmap(ph7_value *pObj) {
* Refer to the official documentation for more information. * Refer to the official documentation for more information.
*/ */
PH7_PRIVATE sxi32 PH7_MemObjToObject(ph7_value *pObj) { PH7_PRIVATE sxi32 PH7_MemObjToObject(ph7_value *pObj) {
if((pObj->iFlags & MEMOBJ_OBJ) == 0) { if(pObj->iFlags & MEMOBJ_NULL) {
/* Invalidate any prior representation */
PH7_MemObjRelease(pObj);
/* Typecast the value */
MemObjSetType(pObj, MEMOBJ_OBJ);
} else if((pObj->iFlags & MEMOBJ_OBJ) == 0) {
ph7_class_instance *pStd; ph7_class_instance *pStd;
ph7_class_method *pCons; ph7_class_method *pCons;
ph7_class *pClass; ph7_class *pClass;