yiisoft / yii2

Yii 2: The Fast, Secure and Professional PHP Framework

Home Page:http://www.yiiframework.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bugs | Object of class yii\mongodb\ActiveQuery could not be converted to string >= 2.0.50

SeniorAlexander opened this issue · comments

Hi everybody!

After updating yii2 to 2.0.50 I get an error in yii\mongodb\ActiveQuery

P.S. In version 2.0.49 everything is fine.

What steps will reproduce the problem?

  $query = MongoLogger::find()->orderBy('created DESC');

  $dataProvider = new ActiveDataProvider([
        'query' => $query,
        'pagination' => [
            'pageSize' => 100,
        ],
  ]);

  //There will be an error here
  $dataProvider->getModels();

What's expected?

What do you get instead?

Object of class yii\mongodb\ActiveQuery could not be converted to string

Additional info

Q A
Yii version 2.0,50
Yii MongoDB version *
MongoDB server version *
PHP version 8.3.0
Operating system all

bug