php 5.2兼容性bug
This commit is contained in:
@@ -107,6 +107,7 @@ test:
|
||||
for i in `find ../var/ -name '*.php'`; do php -l $$i; done;
|
||||
for i in `find ../usr/ -name '*.php'`; do php -l $$i; done;
|
||||
for i in `find ../admin/ -name '*.php'`; do php -l $$i; done;
|
||||
php test.php
|
||||
|
||||
|
||||
all:
|
||||
|
||||
@@ -204,7 +204,7 @@ class CommonMark_Element_BlockElement
|
||||
*/
|
||||
public function getParent()
|
||||
{
|
||||
return $this->parent ? : null;
|
||||
return $this->parent ? $this->parent : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -242,7 +242,8 @@ class CommonMark_InlineParser
|
||||
$this->pos++;
|
||||
}
|
||||
|
||||
$charAfter = $this->peek() ? : "\n";
|
||||
$peek = $this->peek();
|
||||
$charAfter = $peek ? $peek : "\n";
|
||||
|
||||
$canOpen = $numDelims > 0 && $numDelims <= 3 && !preg_match('/\s/', $charAfter);
|
||||
$canClose = $numDelims > 0 && $numDelims <= 3 && !preg_match('/\s/', $charBefore);
|
||||
|
||||
Reference in New Issue
Block a user