Do not limit the output buffering callbacks.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2018-09-05 18:46:42 +02:00
parent 11ba0ce738
commit 6387026e15
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
2 changed files with 1 additions and 4 deletions

View File

@ -7691,16 +7691,14 @@ static int VmObConsumer(const void *pData, unsigned int nDataLen, void *pUserDat
return PH7_OK;
}
PH7_MemObjInit(pVm, &sResult);
if(ph7_value_is_callable(&pEntry->sCallback) && pVm->nObDepth < 15) {
if(ph7_value_is_callable(&pEntry->sCallback)) {
ph7_value sArg, *apArg[2];
/* Fill the first argument */
PH7_MemObjInitFromString(pVm, &sArg, 0);
PH7_MemObjStringAppend(&sArg, (const char *)pData, nDataLen);
apArg[0] = &sArg;
/* Call the 'filter' callback */
pVm->nObDepth++;
PH7_VmCallUserFunction(pVm, &pEntry->sCallback, 1, apArg, &sResult);
pVm->nObDepth--;
if(sResult.iFlags & MEMOBJ_STRING) {
/* Extract the function result */
pData = SyBlobData(&sResult.sBlob);

View File

@ -1229,7 +1229,6 @@ struct ph7_vm {
sxbool bErrReport; /* TRUE to report all runtime Error/Warning/Notice/Deprecated */
int nRecursionDepth; /* Current recursion depth */
int nMaxDepth; /* Maximum allowed recursion depth */
int nObDepth; /* OB depth */
int nExceptDepth; /* Exception depth */
int closure_cnt; /* Loaded closures counter */
int json_rc; /* JSON return status [refer to json_encode()/json_decode()]*/