qlink: Allow passing null as default for $properties

This commit is contained in:
Johannes Meyer 2015-02-23 16:29:07 +01:00
parent 04d2c78983
commit f6ea02fec5
1 changed files with 2 additions and 2 deletions

View File

@ -27,8 +27,8 @@ $this->addHelperFunction('url', function ($path = null, $params = null) {
return $url;
});
$this->addHelperFunction('qlink', function ($title, $url, $params = null, $properties = array(), $escape = true) use ($view) {
if (array_key_exists('title', $properties) && !array_key_exists('aria-label', $properties)) {
$this->addHelperFunction('qlink', function ($title, $url, $params = null, $properties = null, $escape = true) use ($view) {
if ($properties && array_key_exists('title', $properties) && !array_key_exists('aria-label', $properties)) {
$properties['aria-label'] = $properties['title'];
}