Created
June 27, 2013 10:34
-
-
Save yellowback/5875492 to your computer and use it in GitHub Desktop.
FIX for PHP 5.5.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php b/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php | |
index 37ceae6..532937b 100644 | |
--- a/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php | |
+++ b/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php | |
@@ -152,8 +152,12 @@ class serendipity_event_nl2br extends serendipity_event | |
} | |
function restore($text) { | |
- global $_buf; | |
- return preg_replace('~\001(\d+)~e', '$_buf[$1]', $text); | |
+ return preg_replace_callback('~\001(\d+)~', | |
+ function ($m) { | |
+ global $_buf; | |
+ return strtoupper($_buf[$m[1]]); | |
+ }, | |
+ $text); | |
} | |
function event_hook($event, &$bag, &$eventData, $addData = null) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment