Closed drnasin closed 7 years ago
getBaseUrl
and getBasPath
have some problems... See Here
So we provide an way to manual set your base path to be used by plugin.
Instead of:
$smartyPlugins = new \Slim\Views\SmartyPlugins($c['router'], $c['request']->getUri());
You can pass a string on the second argument:
$smartyPlugins = new \Slim\Views\SmartyPlugins($c['router'], 'your base path here');
Ah I see, I was already wondering why is there a check if uri is string an then if it's object. Now I get it...thank you @mathmarques
Hello, Here is a quick way to work around this issue:
$smartyPlugins = new \Slim\Views\SmartyPlugins($c['router'], $c['request']->getUri()->withUserInfo(null));
Hello there, seems like
$this->uri->getBaseUrl()
Is using ->getAuthority() to build a scheme and host which results in http://username:password@localhost/
Solution I used was to use $this->uri->getBasePath() instead of getBaseUrl() in SmartyPlugins->baseUrl function...