PHP warning

unpack(): Type c: not enough input, need 1, have 0

/home/www/demonstrations/master.sondages.pro/htdocs/third_party/yiisoft/yii/framework/i18n/gettext/CGettextMoFile.php(77)

65      * @throws CException
66      */
67     public function load($file,$context)
68     {
69         if(!($fr=@fopen($file,'rb')))
70             throw new CException(Yii::t('yii','Unable to read file "{file}".',
71                 array('{file}'=>$file)));
72 
73         if(!@flock($fr,LOCK_SH))
74             throw new CException(Yii::t('yii','Unable to lock file "{file}" for reading.',
75                 array('{file}'=>$file)));
76 
77         $array=unpack('c',$this->readByte($fr,4));
78         $magic=current($array);
79         if($magic==-34)
80             $this->useBigEndian=false;
81         elseif($magic==-107)
82             $this->useBigEndian=true;
83         else
84             throw new CException(Yii::t('yii','Invalid MO file: {file} (magic: {magic}).',
85                 array('{file}'=>$file,'{magic}'=>$magic)));
86 
87         if(($revision=$this->readInteger($fr))!=0)
88             throw new CException(Yii::t('yii','Invalid MO file revision: {revision}.',
89                 array('{revision}'=>$revision)));

Stack Trace

#1
+
 /home/www/demonstrations/master.sondages.pro/htdocs/application/core/LSMessageSource.php(83): CGettextMoFile->load("/home/www/demonstrations/master.sondages.pro/htdocs/application/...", "")
78             if ($this->useMoFile) {
79                 $file = new CGettextMoFile($this->useBigEndian);
80             } else {
81                 $file = new CGettextPoFile();
82             }
83             $messagesGettext = $file->load($messageFile, $category);
84         } else {
85             $messagesGettext = array();
86         }
87 
88         /* Messages by DB */
#5
+
 /home/www/demonstrations/master.sondages.pro/htdocs/application/helpers/common_helper.php(30): YiiBase::t("", "Afrikaans", array(), LSMessageSource, ...)
25  * @param string $sLanguage
26  * @return string
27  */
28 function gT($sToTranslate, $sEscapeMode = 'html', $sLanguage = null)
29 {
30     return quoteText(Yii::t('', $sToTranslate, array(), null, $sLanguage), $sEscapeMode);
31 }
32 
33 /**
34  * As gT(), but echoes directly
35  *
#6
+
 /home/www/demonstrations/master.sondages.pro/htdocs/application/helpers/surveytranslator_helper.php(82): gT("Afrikaans")
77     if (isset($result[$sLanguageCode][$bOrderByNative])) {
78         return $result[$sLanguageCode][$bOrderByNative];
79     }
80 
81     // Afrikaans
82     $supportedLanguages['af']['description'] = gT('Afrikaans');
83     $supportedLanguages['af']['nativedescription'] = 'Afrikaans';
84     $supportedLanguages['af']['rtl'] = false;
85     $supportedLanguages['af']['dateformat'] = 1;
86     $supportedLanguages['af']['radixpoint'] = 1;
87     $supportedLanguages['af']['momentjs'] = 'af';
2022-10-08 14:36:41 Apache/2.4.38 (Debian) Yii Framework/1.1.26-dev