Fix PHP 5.5 compatibility
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 16 Jul 2020 09:25:48 +0000 (11:25 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 16 Jul 2020 09:25:48 +0000 (11:25 +0200)
wcfsetup/install/files/lib/data/article/ArticleAction.class.php
wcfsetup/install/files/lib/data/page/PageAction.class.php

index 63558c0cbde67487a1121e5f86e483eedc218c3c..324340950c1a60ea83c618356997a89d977d10f1 100644 (file)
@@ -209,13 +209,13 @@ class ArticleAction extends AbstractDatabaseObjectAction {
                                        SearchIndexManager::getInstance()->set(
                                                'com.woltlab.wcf.article',
                                                $articleContent->articleContentID,
-                                               $content['content'] ?? $articleContent->content,
-                                               $content['title'] ?? $articleContent->title,
+                                               isset($content['content']) ? $content['content'] : $articleContent->content,
+                                               isset($content['title']) ? $content['title'] : $articleContent->title,
                                                $article->time,
                                                $article->userID,
                                                $article->username, 
                                                $languageID ?: null,
-                                               $content['teaser'] ?? $articleContent->teaser
+                                               isset($content['teaser']) ? $content['teaser'] : $articleContent->teaser
                                        );
                                        
                                        // save embedded objects
index 266b7d01c437c90720d57c787b1d48b5c58c32d6..c50f5392d200e68ac77be90f408db438f21fd6f9 100644 (file)
@@ -209,8 +209,8 @@ class PageAction extends AbstractDatabaseObjectAction implements ISearchAction,
                                                SearchIndexManager::getInstance()->set(
                                                        'com.woltlab.wcf.page',
                                                        $pageContent->pageContentID,
-                                                       $content['content'] ?? $pageContent->content,
-                                                       $content['title'] ?? $pageContent->title,
+                                                       isset($content['content']) ? $content['content'] : $pageContent->content,
+                                                       isset($content['title']) ? $content['title'] : $pageContent->title,
                                                        0,
                                                        null,
                                                        '',