Error

Non-static method YiiBase::get_scaled_dim_array() cannot be called statically

D:\Mail\Luteranie\mikolow\protected\models\Articles.php(185)

173         if($width == 100) {
174             $image = $this->gallery.$this->path_to_gallery."small/".$gallery[0]->name;
175         } elseif ($width == 400) {
176             $image = $this->gallery.$this->path_to_gallery."medium/".$gallery[0]->name;
177         } else {
178             $image = $this->gallery.$this->path_to_gallery."big/".$gallery[0]->name;
179         }
180         // $image = $this->gallery.$this->path_to_gallery.$gallery[0]->name;
181         if(is_numeric($width))
182         {
183             if(!empty($gallery[0]->name)&&file_exists($image))
184             {
185                 $size = Yii::get_scaled_dim_array($image,$max_w = $width, $max_h = NULL); 
186                 if($size[0]==0||$size[1]==0)
187                 {
188                     $size = Yii::get_scaled_dim_array(Articles::NO_IMAGE,$max_w = $width, $max_h = NULL);
189                     return CHtml::image(Articles::NO_IMAGE,'Brak obrazka',array('style'=>'width:'.$size[0].'px;height:'.$size[1].'px;'.$addition,'class'=>$klasa));
190                 }
191                 else
192                 {
193                     return CHtml::image($image,'obrazek',array('style'=>'width:'.$size[0].'px;height:'.$size[1].'px;'.$addition,'class'=>$klasa));
194                 }
195             }
196             else
197             {    

Stack Trace

#0
+
 D:\Mail\Luteranie\mikolow\protected\views\articles\index.php(15): Articles->getImage()
10         <?php 
11             foreach($models as $n=>$model)
12             {
13                 echo '<div style="overflow:hidden;margin-bottom:10px;">';
14                 echo '<div style="width:100px;float:left;margin-right:10px;">';
15                 echo $model->getImage(100);
16                 echo '</div>';
17                 echo '<div style="width:605px;float:right;">';
18                 echo CHtml::link($model->name,array('view','id'=>$model->id),array("class"=>"article_link")).'<br />';
19                 echo '<span class="text_g_s">Data: '.$model->date_added.'</span><br />';
20                 echo $model->shortText(200);
#5
+
 D:\Mail\Luteranie\mikolow\protected\controllers\ArticlesController.php(234): CController->render()
229         $models=Articles::model()->findAll($criteria);
230         
231         $this->render('index',array(
232             'models'=>$models,
233             'pages'=>$pages,
234             'my_pages'=>$my_pages
235         ));
236     }
237 
238     /**
239      * Manages all models.
#18
+
 D:\Mail\Luteranie\mikolow\index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2022-08-11 00:22:07 Microsoft-IIS/8.5 Yii Framework/1.1.8