com web/pres2: Let's not force PHP 7 quite yet: objects.php

[email protected] (Rasmus Lerdorf) Sun, 07 May 2017 06:15:10 +0000
Newsgroups php.pres
Message-ID <[email protected]>
Commit:    c1bce70ccdbbb5c9650fd04fde7c62f35a6e36b8
Author:    Rasmus Lerdorf <[email protected]>         Sat, 6 May 2017 23:15:10 -0700
Parents:   803c5f5a6d0b7b7bea292c2a9c1f308bcc0fa292
Branches:  master

Link:       http://git.php.net/?p=web/pres2.git;a=commitdiff;h=c1bce70ccdbbb5c9650fd04fde7c62f35a6e36b8

Log:
Let's not force PHP 7 quite yet

Changed paths:
  M  objects.php


Diff:
diff --git a/objects.php b/objects.php
index 5f20e38..12af78a 100644
--- a/objects.php
+++ b/objects.php
@@ -72,7 +72,7 @@ function markup_text($str) {
 
 	$ret = preg_replace('/([\\\])([*#_|^@%])/', '\2', $ret);
 	$ret = preg_replace_callback('/:-:(.*?):-:/', function ($matches) use ($pres) {
-            return $pres->{$matches[1]} ?? '';
+            return empty($pres->{$matches[1]}) ? '' : $pres->{$matches[1]};
         }, $ret);
 	return $ret;
 }