Error

Call to undefined function mb_strlen()

/var/www/bestcoach/site/protected/helpers/CCustom.php(63)

51     {
52         $cases = array (2, 0, 1, 1, 1, 2);
53         return $titles[ ($number%100>4 && $number%100<20)? 2 : $cases[min($number%10, 5)] ];
54     }
55 
56     /**
57      * @param string $str
58      * @param int    $len
59      * @param string $suffix
60      * @return string
61      */
62     public static function cutString($str, $len = 150, $suffix = '...'){
63         if(mb_strlen($str) > $len){
64             return mb_substr($str, 0, $len, 'utf-8').$suffix;
65         }
66 
67         return $str;
68     }
69 
70 }
71 ?>

Stack Trace

#0
+
 /var/www/bestcoach/site/protected/views/coach/_profile/_coachArticles.php(15): CCustom::cutString()
10                 <a href="/blog/article/<?php echo $article->title_translit?>"><h3><?php echo CHtml::encode($article->title); ?></h3></a>
11                     <!--<div class="b-date-row">
12                         <div class="b-icon-text b-icon-text_date"><?php echo $article->getDateFormated()?></div>
13                         <div class="clearboth"></div>
14                     </div>-->
15                 <p><?php echo CCustom::cutString(strip_tags($article->text), 100); ?></p>
16             </div>
17         <?php endforeach; ?>
18 
19         <?php if(!Yii::app()->user->isGuest && (Yii::app()->user->id === $model->id)):?>
20             <div class="b-date-row__more"><a href="/blog/create">Добавить статью</a></div>
#4
+
 /var/www/bestcoach/site/protected/views/coach/profile.php(40): CController->renderPartial("_profile/_coachArticles", array("model" => Coach))
35 <?php echo ((true||isset($_GET['test'])) && Yii::app()->user->id != $model->id) ?  $this->renderPartial('_profile/_sendRequest',array('model'=>new CoachMessage(), 'profile'=>$model)) : '';?>
36 
37 
38     <?php //echo $this->renderPartial('_profile/_portfolio',array('model'=>$model,'is_editable'=>$is_editable));?>
39     <?php echo !$model->isPro()?$this->renderPartial('/coach/_profile/_advertCoaches',array('advertCoaches'=>$advertCoaches, 'title'=>'Другие коучи')):'';?>
40     <?php echo $this->renderPartial('_profile/_coachArticles',array('model'=>$model,));?>
41 
42 <div class="block_other_coaches">
43     <?php
44         $urls = Coachurl::model()->findAll(array('order'=>'sort desc'));
45     ?>
#9
+
 /var/www/bestcoach/site/protected/controllers/CoachController.php(101): CController->render("profile", array("eventSubscribeModel" => CoachEventSubscribe, "model" => Coach, "specializationList" => array(Specialization, Specialization, Specialization, Specialization, ...), "languageList" => array(Language, Language, Language, Language), ...))
096                 'model' => $coach,
097                 'specializationList' => $specializationList,
098                 'languageList' => $languageList,
099                 'priceTypesList' => $priceTypesList,
100                 'is_editable'=>$is_editable,
101                 'advertCoaches'=>$advertCoaches
102             ));
103         }
104     }
105 
106     protected function fillCoachModel(Coach $coach)
2024-03-19 04:19:43 nginx/1.10.3 Yii Framework/1.1.13