Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.10.6
-
Fix Version/s: 1.11.11
-
Component/s: Zend_Navigation
-
Labels:None
Description
When using a navigation xml config file the visible-option is not working as expected as it is not accepting booleans (true/false) as values.
This is accepted:
<visible>0</visible>
This is ignored:
<visible>false</visible>
"false" value is accepted in array configs to this is a little bit confusing and I do not see a reason for forcing integer values as it is actually a flag.
A possible quick fix would be in Zend/Navigation/Page.php on line 731:
$this->_visible = (bool) $visible;
and changing it to:
$this->_visible = (bool)(int) $visible;
but I am not sure if this is the right place to fix this. The problem here is that the string "false" is casted to boolean true.
Attachments
Issue Links
| This issue is duplicated by: | ||||
| ZF-8402 | Zend_View_Helper_Navigation_Menu ignores pages visiblity |
|
|
|
Hello Micha,
Bad idea:
<visible>true</visible>becomes
falseMy proposal for this problem:
but I am not sure if this is the right place to fix this.
The documentation says:
http://framework.zend.com/manual/en/zend.config.adapters.xml.html
<visible>true</visible>false