Browse Source

Check types when looking for 'return'

Without the type check we'll get false positives when looking for
`return`.

Fixes #13304
Mark Story 6 years ago
parent
commit
3378533082
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/Routing/RequestActionTrait.php

+ 2 - 1
src/Routing/RequestActionTrait.php

@@ -108,7 +108,8 @@ trait RequestActionTrait
         if (empty($url)) {
             return false;
         }
-        if (($index = array_search('return', $extra)) !== false) {
+        $isReturn = array_search('return', $extra, true);
+        if ($isReturn !== false) {
             $extra['return'] = 0;
             $extra['autoRender'] = 1;
             unset($extra[$index]);