Skip to content

Commit 55722e5

Browse files
committed
this didnt need to change
1 parent 76bb1ce commit 55722e5

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/View/Antlers/Language/Runtime/Sandbox/Environment.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)