Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix some errors with merging page & asset data

  • Loading branch information...
commit 373b3167247feb85239bb2f5f7cbf57f0f2b9800 1 parent 1b4a03c
Anthony Kolber authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 app/asset-types/asset-factory.inc.php
5 app/asset-types/asset-factory.inc.php
View
@@ -13,7 +13,7 @@ static function extract_page_data($asset_path) {
# return any page data scoped against the asset filename
$page_data = self::$store[$page_path];
- return $page_data[$file_name];
+ return isset($page_data[$file_name]) ? $page_data[$file_name] : false;
}
static function &create($file_path) {
@@ -42,7 +42,8 @@ static function &create($file_path) {
$page_data = self::extract_page_data($file_path);
# create a new asset and return its data
$asset = new $asset($file_path);
- return array_merge($asset->data, is_array($page_data) ? $page_data : array());
+ $merged_data = array_merge($asset->data, is_array($page_data) ? $page_data : array());
+ return $merged_data;
} else {
# new page
Please sign in to comment.
Something went wrong with that request. Please try again.