瀏覽代碼

Strict type checking

Visman 3 年之前
父節點
當前提交
cad7469b88
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      app/Models/Forum/Forum.php
  2. 1 1
      app/Models/Topic/Topic.php

+ 1 - 1
app/Models/Forum/Forum.php

@@ -54,7 +54,7 @@ class Forum extends DataModel
     {
         $user = $this->c->user;
 
-        return 1 == $this->post_topics
+        return 1 === $this->post_topics
             || (
                 null === $this->post_topics
                 && 1 === $user->g_post_topics

+ 1 - 1
app/Models/Topic/Topic.php

@@ -69,7 +69,7 @@ class Topic extends DataModel
         ) {
             return false;
         } elseif (
-            '1' == $this->parent->post_replies
+            1 === $this->parent->post_replies
             || (
                 null === $this->parent->post_replies
                 && 1 === $this->c->user->g_post_replies