projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
335be68
)
Make sure that $options['locals'] is an array or Traversable before trying to loop it.
author
Chuck Hagenbuch
<chuck@horde.org>
Sun, 6 Jun 2010 18:16:55 +0000
(14:16 -0400)
committer
Chuck Hagenbuch
<chuck@horde.org>
Sun, 6 Jun 2010 18:17:25 +0000
(14:17 -0400)
framework/View/lib/Horde/View/Base.php
patch
|
blob
|
history
diff --git
a/framework/View/lib/Horde/View/Base.php
b/framework/View/lib/Horde/View/Base.php
index
6b09e8f
..
61edf1a
100644
(file)
--- a/
framework/View/lib/Horde/View/Base.php
+++ b/
framework/View/lib/Horde/View/Base.php
@@
-290,8
+290,10
@@
abstract class Horde_View_Base
}
// set local variables to be used in the partial
- foreach ($options['locals'] as $key => $val) {
- $locals[$key] = $val;
+ if (isset($options['locals']) && (is_array($options['locals']) || $options['locals'] instanceof Traversable)) {
+ foreach ($options['locals'] as $key => $val) {
+ $locals[$key] = $val;
+ }
}
// collection