File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ protected function initPagePath() {
140140
141141 // strip off app path from path
142142 $ pathElems = explode ('/ ' , $ this ->request ->pagePath );
143- while ($ pathElems [0 ] === '' ) array_shift ($ pathElems );
143+ while (( count ( $ pathElems) > 0 ) && ( $ pathElems [0 ] === '' ) ) array_shift ($ pathElems );
144144 // Check language
145145 if (count ($ pathElems ) > 0 ) {
146146 if ($ this ->hasLanguage ($ pathElems [0 ])) {
@@ -154,7 +154,7 @@ protected function initPagePath() {
154154 $ this ->request ->language = $ this ->getDefaultLanguage ();
155155 }
156156 }
157- while ($ pathElems [0 ] === '' ) array_shift ($ pathElems );
157+ while (( count ( $ pathElems) > 0 ) && ( $ pathElems [0 ] === '' ) ) array_shift ($ pathElems );
158158 $ this ->request ->pagePathElements = $ pathElems ;
159159 $ this ->request ->useLanguagePath = count ($ this ->languages ) > 1 ;
160160
You can’t perform that action at this time.
0 commit comments