File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
src/View/Antlers/Language/Runtime/Sandbox Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -891,20 +891,16 @@ public function process($nodes)
891891
892892 continue ;
893893 } elseif ($ currentNode instanceof MethodInvocationNode) {
894- $ isMethodCallDisabled = GlobalRuntimeState::$ isEvaluatingUserData && ! GlobalRuntimeState::$ allowMethodsInContent ;
895-
896- if ($ isMethodCallDisabled ) {
894+ if (GlobalRuntimeState::$ isEvaluatingUserData && ! GlobalRuntimeState::$ allowMethodsInContent ) {
897895 array_pop ($ stack );
898896
899- if (GlobalRuntimeState::$ isEvaluatingUserData
900- && ! GlobalRuntimeState::$ allowMethodsInContent
901- && GlobalRuntimeState::$ throwErrorOnAccessViolation ) {
897+ if (GlobalRuntimeState::$ throwErrorOnAccessViolation ) {
902898 throw ErrorFactory::makeRuntimeError (
903899 AntlersErrorCodes::RUNTIME_METHOD_CALL_USER_CONTENT ,
904900 $ currentNode ,
905901 'Method invocation in user content. '
906902 );
907- } elseif (GlobalRuntimeState:: $ isEvaluatingUserData ) {
903+ } else {
908904 Log::warning ('Method call evaluated in user content. ' , [
909905 'file ' => GlobalRuntimeState::$ currentExecutionFile ,
910906 'trace ' => GlobalRuntimeState::$ templateFileStack ,
You can’t perform that action at this time.
0 commit comments