[8192] ErrorException in common.php line 188

Array and string offset access syntax with curly braces is deprecated

  1. return null;
  2. }
  3. //php获取中文字符拼音首字母
  4. function WSTGetFirstCharter($str){
  5. if(empty($str)){
  6. return '';
  7. }
  8. $fchar=ord($str{0});
  9. if($fchar>=ord('A')&&$fchar<=ord('z')) return strtoupper($str{0});
  10. $s1=iconv('UTF-8','utf-8',$str);
  11. $s2=iconv('utf-8','UTF-8',$s1);
  12. $s=$s2==$str?$s1:$str;
  13. if(empty($s{1})){
  14. return '';
  15. }
  16. $asc=ord($s{0})*256+ord($s{1})-65536;
  17. if($asc>=-20319 && $asc<=-20284) return 'A';

Call Stack

  1. in common.php line 188
  2. at Error::appError(8192, 'Array and string off...', 'C:\Apache24\htdocs\z...', 188, ['module' => '', 'path' => 'C:\Apache24\htdocs\z...', 'tags' => ['app_begin' => ['wstmall\shop\behavio...', 'wstmall\common\behav...']]]) in App.php line 290
  3. at include_once() in App.php line 290
  4. at App->init() in App.php line 211
  5. at App->initialize() in App.php line 379
  6. at App->run() in index.php line 20