We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sizeof(): Argument #1 ($value) must be of type Countable|array, null given
code
<?php namespace app\models; use Yii; use yiidreamteam\upload\ImageUploadBehavior; /** * This is the model class for table "reviews". * * @property int $id * @property string|null $name * @property string|null $body * @property string|null $avatar * @property int|null $rating * * @mixin ImageUploadBehavior */ class Reviews extends \yii\db\ActiveRecord { /** * {@inheritdoc} */ public static function tableName() { return 'reviews'; } public function behaviors(): array { return [ [ 'class' => ImageUploadBehavior::class, 'attribute' => 'avatar', 'createThumbsOnRequest' => true, 'filePath' => '@webroot/origin/reviews/[[id]].[[extension]]', 'fileUrl' => '@web/origin/reviews/[[id]].[[extension]]', 'thumbPath' => '@webroot/cache/reviews/[[profile]]_[[id]].[[extension]]', 'thumbUrl' => '@web/cache/reviews/[[profile]]_[[id]].[[extension]]', 'thumbs' => [ 'thumb' => ['width'=>286, 'height'=>220], 'mini' => ['width' => 240, 'height' => 160], 'admin' => ['width'=> 100, 'height'=>100], 'webp_thumb' => ['width' => 100, 'height' => 100, 'extension' => 'webp'], ], ], ]; } /** * {@inheritdoc} */ public function rules() { return [ [['name', 'body'], 'string'], [['rating'], 'integer'], ['avatar', 'image', 'extensions' => 'jpg, jpeg, gif, png'] ]; } }
Corrected if written in the GD file protected $options = [];
The text was updated successfully, but these errors were encountered:
No branches or pull requests
sizeof(): Argument #1 ($value) must be of type Countable|array, null given
code
Corrected if written in the GD file
protected $options = [];
The text was updated successfully, but these errors were encountered: