mirror of
https://github.com/getgrav/grav.git
synced 2025-10-26 07:56:07 +01:00
Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # CHANGELOG.md
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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')), '/') . '/';
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user