[BUGFIX] Handle empty string icon-overlay identifier 12/54212/4
authorRomain Canon <romain.hydrocanon@gmail.com>
Sat, 23 Sep 2017 13:07:02 +0000 (15:07 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Fri, 29 Sep 2017 15:43:27 +0000 (17:43 +0200)
commita8cf2451a4026968ae4b4157d79e633320ffc2f8
tree381dd36dc084dd193163ba822714dd2d9c5d5891
parent978f679bf0b7edad66aab154aa7f97188fcd621e
[BUGFIX] Handle empty string icon-overlay identifier

An overlay identifier can be an empty string, for instance when the icon API is
called with the Fluid icon view helper:

```
<core:icon identifier="tx-my-icon"
           overlay="{f:if(condition: myCondition, then: 'my-overlay-icon')}" />
```

In the example below, if the condition `myCondition` is `false`, an empty string
is used for the overlay parameter.

---

Previously, an empty string as overlay identifier would lead to the basic "not
found icon" being used as overlay.

With this commit, the behaviour for an empty string will now be the same as when
 `null` is used.

---

Resolves: #82547
Releases: master, 8.7
Change-Id: I6fb8207f302873e0188d71a210485bbf8565eff9
Reviewed-on: https://review.typo3.org/54212
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Romain Canon <romain.hydrocanon@gmail.com>
Tested-by: Romain Canon <romain.hydrocanon@gmail.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/core/Classes/Imaging/IconFactory.php