projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87cb2cb
)
Handle unserialize() failures gracefully
author
Chuck Hagenbuch
<chuck@horde.org>
Fri, 24 Sep 2010 15:22:11 +0000
(11:22 -0400)
committer
Chuck Hagenbuch
<chuck@horde.org>
Fri, 24 Sep 2010 15:22:11 +0000
(11:22 -0400)
ansel/lib/Gallery.php
patch
|
blob
|
history
diff --git
a/ansel/lib/Gallery.php
b/ansel/lib/Gallery.php
index
4e6f17b
..
e927431
100644
(file)
--- a/
ansel/lib/Gallery.php
+++ b/
ansel/lib/Gallery.php
@@
-732,7
+732,10
@@
class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical
$style = Ansel::getStyleDefinition($GLOBALS['prefs']->getValue('default_gallerystyle'));
} else {
// Explicitly defined style
- $style = unserialize($this->data['attribute_style']);
+ $style = @unserialize($this->data['attribute_style']);
+ if (!$style) {
+ $style = Ansel::getStyleDefinition($GLOBALS['prefs']->getValue('default_gallerystyle'));
+ }
}
// Check browser requirements. If we require PNG support, and do not