com web/pres2: How did this ever work?: objects.php
| From: | Rasmus Lerdorf | Date: | Sat, 06 May 2017 13:59:02 +0000 |
| Subject: | com web/pres2: How did this ever work?: objects.php | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-2218@lists.php.net to get a copy of this message | ||
Commit: 803c5f5a6d0b7b7bea292c2a9c1f308bcc0fa292
Author: Rasmus Lerdorf <rasmus@php.net> Sat, 6 May 2017 06:59:02 -0700
Parents: 5dbc9058f49bc3a7fd6e58f7a606cf95c69c49e0
Branches: master
Link: http://git.php.net/?p=web/pres2.git;a=commitdiff;h=803c5f5a6d0b7b7bea292c2a9c1f308bcc0fa292
Log:
How did this ever work?
Changed paths:
M objects.php
Diff:
diff --git a/objects.php b/objects..php
index 4224486..5f20e38 100644
--- a/objects.php
+++ b/objects.php
@@ -71,8 +71,8 @@ function markup_text($str) {
$ret = preg_replace('/TAB\//',' ',$ret);
$ret = preg_replace('/([\\\])([*#_|^@%])/', '\2', $ret);
- $ret = preg_replace_callback('/:-:(.*?):-:/', function ($matches) {
- return $pres->$match[1];
+ $ret = preg_replace_callback('/:-:(.*?):-:/', function ($matches) use ($pres) {
+ return $pres->{$matches[1]} ?? '';
}, $ret);
return $ret;
}