vadeg_ne@mail.ru 1 năm trước cách đây
mục cha
commit
ae7fceee3c
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      controllers/NewsController.php

+ 1 - 1
controllers/NewsController.php

@@ -253,7 +253,7 @@ class NewsController extends Controller
 
     public function actionInfinityNewsfeed($post_id,$last_post_id=NULL,$amount=0){
         if($last_post_id=="null"){
-            $last_post = News::find()->limit(1);
+            $last_post = News::find()->limit(1)->one();
         } else {
             $last_post = News::findOne(["id"=>$last_post_id]);
         }