File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -392,6 +392,7 @@ public function constructUrl(Application\Request $appRequest, Nette\Http\Url $re
392392 }
393393 } while (TRUE );
394394
395+ $ scheme = $ this ->scheme ?: $ refUrl ->getScheme ();
395396
396397 if ($ this ->type === self ::HOST ) {
397398 $ host = $ refUrl ->getHost ();
@@ -403,18 +404,17 @@ public function constructUrl(Application\Request $appRequest, Nette\Http\Url $re
403404 '%sld% ' => isset ($ parts [1 ]) ? $ parts [1 ] : '' ,
404405 '%host% ' => $ host ,
405406 ]);
406- $ url = ( $ this -> scheme ?: $ refUrl -> getScheme ()) . ': ' . $ url ;
407+ $ url = $ scheme . ': ' . $ url ;
407408 } else {
408409 if ($ this ->lastRefUrl !== $ refUrl ) {
409- $ scheme = ($ this ->scheme ?: $ refUrl ->getScheme ());
410410 $ basePath = ($ this ->type === self ::RELATIVE ? $ refUrl ->getBasePath () : '' );
411411 $ this ->lastBaseUrl = $ scheme . ':// ' . $ refUrl ->getAuthority () . $ basePath ;
412412 $ this ->lastRefUrl = $ refUrl ;
413413 }
414414 $ url = $ this ->lastBaseUrl . $ url ;
415415 }
416416
417- if (strpos ($ url , '// ' , 7 ) !== FALSE ) {
417+ if (strpos ($ url , '// ' , strlen ( $ scheme ) + 3 ) !== FALSE ) {
418418 return NULL ;
419419 }
420420
You can’t perform that action at this time.
0 commit comments