Fix PHP 8.2 compatibility in HascontentPrefilterTemplatePlugin
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 10 Jun 2022 08:03:15 +0000 (10:03 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 15 Jun 2022 11:03:14 +0000 (13:03 +0200)
> Use of "self" in callables is deprecated

wcfsetup/install/files/lib/system/template/plugin/HascontentPrefilterTemplatePlugin.class.php

index 75c0d801db922e9fea87f93e0bec2570593a5c30..02468cbc6572ce3544c3b9daf30b8acba8761adf 100644 (file)
@@ -37,7 +37,7 @@ class HascontentPrefilterTemplatePlugin implements IPrefilterTemplatePlugin
 
         return \preg_replace_callback(
             "~{$ldq}hascontent( assign='(?P<assign>.*)')?{$rdq}(?P<before>.*){$ldq}content{$rdq}(?P<content>.*){$ldq}\\/content{$rdq}(?P<after>.*)({$ldq}hascontentelse{$rdq}(?P<else>.*))?{$ldq}\\/hascontent{$rdq}~sU",
-            ['self', 'replaceContentCallback'],
+            [self::class, 'replaceContentCallback'],
             $sourceContent
         );
     }