PHP warning

mb_strpos(): Offset not contained in string

/home/talalkozasokhaza/public_html/protected/extensions/extra.php(119)

107            return $mail->Send();                     
108             
109     }
110     
111     public static function getIntro($text, $limit = 50)
112     {
113             $text = html_entity_decode($text, ENT_COMPAT , 'UTF-8'  );
114                                     
115             $intro = strip_tags($text);
116                                     
117             if(strlen($intro) > ($limit + 5)){
118                 
119                 $end = mb_strpos($intro, ' ', ($limit - 3), 'UTF-8');
120                 if($end == false || $end >= ($limit + 5))
121                     $end = $limit;
122                 
123                 $return = mb_substr($intro, 0, $end, 'UTF-8');
124                 
125                 return trim($return). '...';
126                 
127             } else {
128                 return trim($intro);    
129             }
130     }
131     

Stack Trace

#0
+
 /home/talalkozasokhaza/public_html/protected/extensions/extra.php(119): mb_strpos("Molnárné Balla Gyöngyi és tanítványainak munkái mindig sz...", " ", 197, "UTF-8")
114                                     
115             $intro = strip_tags($text);
116                                     
117             if(strlen($intro) > ($limit + 5)){
118                 
119                 $end = mb_strpos($intro, ' ', ($limit - 3), 'UTF-8');
120                 if($end == false || $end >= ($limit + 5))
121                     $end = $limit;
122                 
123                 $return = mb_substr($intro, 0, $end, 'UTF-8');
124                 
#1
+
 /home/talalkozasokhaza/public_html/themes/classic/views/post/_view.php(17): extra::getIntro("<p>Moln&aacute;rn&eacute; Balla Gy&ouml;ngyi &eacute;s tan&iacut...", 200)
12       
13      <?php elseif ($data->type == Post::TYPE_GALLERY): ?>
14      
15          <div class="hirszoveg">
16             <h1><?php echo CHtml::link($data->title, $data->url, array('title'=>$data->title)); ?></h1>
17             <?php echo CHtml::link(extra::getIntro($data->content, 200), $data->url, array('title'=>$data->title)); ?>
18        </div>
19        
20        <div class="gallery-thumbs">
21                <?php foreach ($data->getGallery(8) as $gallery)
22                        echo CHtml::link(CHtml::image($gallery->getPicture('thumb'), $gallery->title), $data->url, array('title'=>$gallery->title));
#11
+
 /home/talalkozasokhaza/public_html/themes/classic/views/post/index.php(12): CBaseController->widget("zii.widgets.CListView", array("dataProvider" => CActiveDataProvider, "itemView" => "_view", "summaryText" => "", "template" => "<div style="overflow:hidden; width: 100%">{items}</div><div clas...", ...))
07     'pager'=>array(
08             'cssFile'=>false,
09             'header'=>'',
10             'maxButtonCount'=>7
11         ),
12 ));         
13 
14     $meta = Meta::getMeta(2);
15 
16     Meta::renderMeta($meta['description'], $meta['key'], $dataProvider->getPagination(), array('/post/index'));
17 
2024-03-28 21:48:57 Apache Yii Framework/1.1.10