PHP error

Array and string offset access syntax with curly braces is deprecated

/home/bangsaonline/public_html/azzamsource/framework/i18n/CDateFormatter.php(93)

081      * Formats a date according to a customized pattern.
082      * @param string $pattern the pattern (See {@link http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns})
083      * @param mixed $time UNIX timestamp or a string in strtotime format
084      * @return string formatted date time. Null if $time is null. (the null value check is available since Yii 1.1.11)
085      */
086     public function format($pattern,$time)
087     {
088         if($time===null)
089             return null;
090 
091         if(is_string($time))
092         {
093             if(ctype_digit($time) || ($time{0}=='-' && ctype_digit(substr($time, 1))))
094                 $time=(int)$time;
095             else
096                 $time=strtotime($time);
097         }
098         $date=CTimestamp::getDate($time,false,false);
099         $tokens=$this->parseFormat($pattern);
100         foreach($tokens as &$token)
101         {
102             if(is_array($token)) // a callback: method name, sub-pattern
103                 $token=$this->{$token[0]}($token[1],$date);
104         }
105         return implode('',$tokens);

Stack Trace

#6
+
 /home/bangsaonline/public_html/global.php(246): CModule->__get("dateFormatter")
241         if($data && $locale && $locale=='yes' ){
242             $locale = " WIB";
243         }else{
244             $locale ="";
245         }
246         $time =  Yii::app()->dateFormatter->formatDateTime($data, "full", "short").$locale;
247         
248         return $time;
249     }
250     
251     
#7
+
 /home/bangsaonline/public_html/protected/views/front/berita/detail.php(298): get_time("2020-02-25 20:13:20", "dd MMMM yyyy | HH:MM", " WIB")
293                                                 <?php if (!empty($data['sponsored'])) { ?><span>Sponsored by:</span> <span><?php echo $data['sponsored']; ?></span><?php } ?>
294                                             </div>
295 
296                                         </div><!--./ entry-meta-author -->
297                                         <div class="entry-date">
298                                             <span><?php echo get_time($data['news_date'], "dd MMMM yyyy | HH:MM", "yes"); ?></span>
299                                         </div><!--./ entry-date -->
300 
301                                     </div><!--./ entry-meta-content -->
302                                 </div><!--./ content-entry-wrap -->
303                             </div>
#12
+
 /home/bangsaonline/public_html/protected/controllers/front/BeritaController.php(78): CController->render("detail", array("data" => array("news_id" => "69909", "news_title" => "Sutiaji Tinjau Rumah Longsor di Muharto, Minta Warga Tak Buang S...", "news_content" => "<p><strong>KOTA MALANG, BANGSAONLINE.com </strong>- Wali Kota Ma...", "news_excerpt" => "", ...), "slugid" => "69909/sutiaji-tinjau-rumah-longsor-di-muharto-minta-warga-tak-bu..."))
73             }
74 
75             $this->amp_url = get_link_berita_amp("berita",$dataReader['news_id'],$dataReader['news_slug']);
76 
77             if(!empty($dataReader)){
78                 $this->render('detail', array('data' => $dataReader, 'slugid'=>$dataReader['news_id']."/".$dataReader['news_slug']));
79             }else{
80                 $this->redirect('/', 301);
81                 // throw new CHttpException(404,'Maaf, halaman yang anda cari tidak ditemukan.');
82             }
83 
2026-05-09 15:57:56 Apache Yii Framework/1.1.14