Skip to content

Commit

Permalink
Merge pull request #1618 from Guite/1.3
Browse files Browse the repository at this point in the history
This PR was merged into zikula:1.3 branch.

Discussion
----------

More solid block content decoding

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | Guite/MostGenerator#499
| Refs tickets  | 
| License       | MIT
| Doc PR        | 

Commits
-------

05a3297 More solid block content decoding Guite
918b15f Update CHANGELOG Guite
ace4f36 Use DataUtil API for checking if content is serialised Guite
  • Loading branch information
Drak committed Feb 16, 2014
2 parents 23376d7 + ace4f36 commit 9292087
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/docs/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ CHANGELOG - ZIKULA 1.3.7
- Fixed bugs in DBObject #616, #617, #618
- Fixed Formutil z-formrow - label - input type file looks bad on Safari (webkit) #621
- Added fileupload input styling Webkit #622
- Fix developer notices #564
- Fix developer notices #564
- Fixed decoding of Block content which made problems on some servers


CHANGELOG - ZIKULA 1.3.6
Expand Down
10 changes: 5 additions & 5 deletions src/lib/util/BlockUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,12 +428,12 @@ public static function loadAll()
*/
public static function varsFromContent($content)
{
// Assume serialized content ends in a ";" followed by some curly-end-braces
if (preg_match('/;}*$/', $content)) {
// Serialised content
// Try to unserialize first
if (DataUtil::is_serialized($content, false)) {
$vars = unserialize($content);

return $vars;
if ($vars !== false && is_array($vars)) {
return $vars;
}
}

// Unserialised content
Expand Down

0 comments on commit 9292087

Please sign in to comment.