mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing querystring parameters being chopped off of absolute webroot asset paths.
This commit is contained in:
parent
6ccc43d776
commit
f04add4f79
2 changed files with 14 additions and 10 deletions
|
@ -224,7 +224,7 @@ class Helper extends Overloadable {
|
|||
}
|
||||
}
|
||||
if (strpos($webPath, '//') !== false) {
|
||||
return str_replace('//', '/', $webPath);
|
||||
return str_replace('//', '/', $webPath . $asset[1]);
|
||||
}
|
||||
return $webPath . $asset[1];
|
||||
}
|
||||
|
|
|
@ -697,6 +697,10 @@ class HelperTest extends CakeTestCase {
|
|||
$expected = '/img/cake.icon.gif';
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$result = $this->Helper->webroot('/img/cake.icon.gif?some=param');
|
||||
$expected = '/img/cake.icon.gif?some=param';
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
Configure::write('App.www_root', $webRoot);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue