Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	CHANGELOG.md
This commit is contained in:
Matias Griese
2019-04-17 22:11:08 +03:00
4 changed files with 12 additions and 3 deletions

View File

@@ -5,6 +5,10 @@
* `FormInterface` now implements `RenderInterface`
* Added new `FormInterface::getTask()` method which reads the task from `form.task` in the blueprint
1. [](#bugfix)
* Rollback `redirect_default_route` logic as it has issues with multilang [#2459](https://github.com/getgrav/grav/issues/2459)
* Fix potential issue with `|contains` Twig filter on PHP 7.3
* Fixed bug in text field filtering: return empty string if value isn't a string or number [#2460](https://github.com/getgrav/grav/issues/2460)
* Force Asset `priority` to be an integer and not throw error if invalid string passed [#2461](https://github.com/getgrav/grav/issues/2461)
* Fixed bug in text field filtering: return empty string if value isn't a string or number
* Fixed `FlexForm` missing getter methods for defining form variables

View File

@@ -78,6 +78,9 @@ abstract class BaseAsset extends PropertyObject
}
}
// Force priority to be an int
$this->priority = (int) $this->priority;
// Do some special stuff for CSS/JS (not inline)
if (!Utils::startsWith($this->getType(), 'inline')) {
$this->base_url = rtrim($uri->rootUrl($config->get('system.absolute_urls')), '/') . '/';

View File

@@ -80,8 +80,6 @@ class PagesServiceProvider implements ServiceProviderInterface
}
// Default route test and redirect
if ($config->get('system.pages.redirect_default_route') && $page->route() !== $path) {
$uri->setUriProperties(['path' => $page->route()]);
$url = $uri->toOriginalString();
$c->redirect($url);
}
}

View File

@@ -447,7 +447,11 @@ class TwigExtension extends \Twig_Extension implements \Twig_Extension_GlobalsIn
*/
public function containsFilter($haystack, $needle)
{
return (strpos($haystack, $needle) !== false);
if (empty($needle)) {
return $haystack;
}
return (strpos($haystack, (string) $needle) !== false);
}
/**