Permalink
Browse files

Re-allow non-string $key values

ie. normal YAML
  • Loading branch information...
1 parent 7f5105d commit a6aa285a98f3d4e6f350803a1f4cbff2400c4503 @kolber committed Apr 16, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 app/asset-types/asset-factory.inc.php
  2. +1 −1 app/page-data.inc.php
@@ -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 isset($page_data[$file_name]) ? $page_data[$file_name] : array();
+ return $page_data[$file_name];
}
static function &create($file_path) {
View
@@ -213,7 +213,7 @@ static function create_textfile_vars($page) {
# set a variable with a name of 'key' on the page with a value of 'value'
# if the template type is xml or html & the 'value' contains a newline character, parse it as markdown
if (!is_string($value)) {
- return;
+ $page->$key = $value;
} else if ($markdown_compatible && strpos($value, "\n") !== false) {
$page->$key = Markdown(trim($value));
} else {

0 comments on commit a6aa285

Please sign in to comment.