com web/master: fixing up a few E_STRICTs: include/Text/r eST.php include/Text/reST/Formatter.php include/Text/re ST/Parser.php
| From: | Ferenc Kovacs | Date: | Tue, 07 Aug 2012 21:25:53 +0000 |
| Subject: | com web/master: fixing up a few E_STRICTs: include/Text/r eST.php include/Text/reST/Formatter.php include/Text/re ST/Parser.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-14069@lists.php.net to get a copy of this message | ||
Commit: 46120b083bf17579e1989d2b5181906225a53330
Author: Ferenc Kovacs <tyra3l@gmail.com> Tue, 7 Aug 2012 23:25:53 +0200
Parents: 0f44d494a50b168b363c1e60dd09f5a19e6fe21e
Branches: master
Link: http://git.php.net/?p=web/master.git;a=commitdiff;h=46120b083bf17579e1989d2b5181906225a53330
Log:
fixing up a few E_STRICTs
Changed paths:
M include/Text/reST.php
M include/Text/reST/Formatter.php
M include/Text/reST/Parser.php
Diff:
diff --git a/include/Text/reST.php b/include/Text/reST.php
index bb3263e..6ad98b2 100644
--- a/include/Text/reST.php
+++ b/include/Text/reST.php
@@ -132,7 +132,7 @@ class Text_reST {
*
* @return Text_reST The parsed document or PEAR_Error on failure.
*/
- function &parse($text)
+ static function &parse($text)
{
require_once dirname(__FILE__) . '/reST/Parser.php';
$parser = new Text_reST_Parser();
diff --git a/include/Text/reST/Formatter.php b/include/Text/reST/Formatter.php
index 0f062dd..381f338 100644
--- a/include/Text/reST/Formatter.php
+++ b/include/Text/reST/Formatter.php
@@ -42,7 +42,7 @@ class Text_reST_Formatter {
*
* @return Text_reST_Formatter The formatter
*/
- function &factory($driver, $args = array())
+ static function &factory($driver, $args = array())
{
if (is_array($driver)) {
list($path, $driver) = $driver;
diff --git a/include/Text/reST/Parser.php b/include/Text/reST/Parser.php
index d9a6f29..d15921c 100644
--- a/include/Text/reST/Parser.php
+++ b/include/Text/reST/Parser.php
@@ -469,7 +469,8 @@ class Text_reST_Parser {
}
$l = &$this->_makeNode($this->_currentNode, 'Literal-Block', array());
- $l->appendChild(preg_replace('/\s+$/s', '', $text));
+ $stripped_text = preg_replace('/\s+$/s', '', $text);
+ $l->appendChild($stripped_text);
// XXX: Dirty hack!
array_unshift($this->_lineBuffer, '');