Skip to content
Browse files

Don't run preg_replace on non-string values

  • Loading branch information...
1 parent 7012382 commit 0b8f39553ec017b7877439b1287a5a07ee903e38 @kolber committed Jun 4, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/page-data.inc.php
View
2 app/page-data.inc.php
@@ -220,7 +220,7 @@ static function create_textfile_vars($page, $content = false) {
foreach ($vars as $key => $value) {
# replace the only var in your content - page.path for your inline html with images and stuff
- $value = preg_replace('/{{\s*path\s*}}/', $relative_path . '/', $value);
+ if (is_string($value)) $value = preg_replace('/{{\s*path\s*}}/', $relative_path . '/', $value);
# 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

0 comments on commit 0b8f395

Please sign in to comment.
Something went wrong with that request. Please try again.