From f4bb7bcbff3770387c2fecfa91ce4a60b916a474 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 27 Nov 2020 08:04:00 +0000 Subject: update composer libs --- .../text_languagedetect/Text/LanguageDetect.php | 42 ++++++++++------------ 1 file changed, 18 insertions(+), 24 deletions(-) (limited to 'vendor/pear/text_languagedetect/Text') diff --git a/vendor/pear/text_languagedetect/Text/LanguageDetect.php b/vendor/pear/text_languagedetect/Text/LanguageDetect.php index 420faa941..850b1beaf 100644 --- a/vendor/pear/text_languagedetect/Text/LanguageDetect.php +++ b/vendor/pear/text_languagedetect/Text/LanguageDetect.php @@ -12,9 +12,9 @@ * @link http://pear.php.net/package/Text_LanguageDetect/ */ -//require_once 'Text/LanguageDetect/Exception.php'; -//require_once 'Text/LanguageDetect/Parser.php'; -//require_once 'Text/LanguageDetect/ISO639.php'; +require_once 'Text/LanguageDetect/Exception.php'; +require_once 'Text/LanguageDetect/Parser.php'; +require_once 'Text/LanguageDetect/ISO639.php'; /** * Detects the language of a given piece of text. @@ -189,7 +189,7 @@ class Text_LanguageDetect */ protected function _get_data_loc($fname) { - if ($fname{0} == '/' || $fname{0} == '.') { + if ($fname[0] == '/' || $fname[0] == '.') { // if filename starts with a slash, assume it's an absolute pathname // and skip whatever is in $this->_data_dir return $fname; @@ -247,12 +247,6 @@ class Text_LanguageDetect protected function _checkTrigram($trigram) { if (!is_array($trigram)) { - if (ini_get('magic_quotes_runtime')) { - throw new Text_LanguageDetect_Exception( - 'Error loading database. Try turning magic_quotes_runtime off.', - Text_LanguageDetect_Exception::MAGIC_QUOTES - ); - } throw new Text_LanguageDetect_Exception( 'Language database is not an array.', Text_LanguageDetect_Exception::DB_NOT_ARRAY @@ -1470,31 +1464,31 @@ class Text_LanguageDetect case 1: // normal ASCII-7 byte // 0xxxxxxx --> 0xxxxxxx - return ord($char{0}); + return ord($char[0]); case 2: // 2 byte unicode // 110zzzzx 10xxxxxx --> 00000zzz zxxxxxxx - $z = (ord($char{0}) & 0x000001F) << 6; - $x = (ord($char{1}) & 0x0000003F); + $z = (ord($char[0]) & 0x000001F) << 6; + $x = (ord($char[1]) & 0x0000003F); return ($z | $x); case 3: // 3 byte unicode // 1110zzzz 10zxxxxx 10xxxxxx --> zzzzzxxx xxxxxxxx - $z = (ord($char{0}) & 0x0000000F) << 12; - $x1 = (ord($char{1}) & 0x0000003F) << 6; - $x2 = (ord($char{2}) & 0x0000003F); + $z = (ord($char[0]) & 0x0000000F) << 12; + $x1 = (ord($char[1]) & 0x0000003F) << 6; + $x2 = (ord($char[2]) & 0x0000003F); return ($z | $x1 | $x2); case 4: // 4 byte unicode // 11110zzz 10zzxxxx 10xxxxxx 10xxxxxx --> // 000zzzzz xxxxxxxx xxxxxxxx - $z1 = (ord($char{0}) & 0x00000007) << 18; - $z2 = (ord($char{1}) & 0x0000003F) << 12; - $x1 = (ord($char{2}) & 0x0000003F) << 6; - $x2 = (ord($char{3}) & 0x0000003F); + $z1 = (ord($char[0]) & 0x00000007) << 18; + $z2 = (ord($char[1]) & 0x0000003F) << 12; + $x1 = (ord($char[2]) & 0x0000003F) << 6; + $x2 = (ord($char[3]) & 0x0000003F); return ($z1 | $z2 | $x1 | $x2); } } @@ -1514,7 +1508,7 @@ class Text_LanguageDetect */ protected static function _next_char($str, &$counter, $special_convert = false) { - $char = $str{$counter++}; + $char = $str[$counter++]; $ord = ord($char); // for a description of the utf8 system see @@ -1538,7 +1532,7 @@ class Text_LanguageDetect } elseif ($ord >> 5 == 6) { // two-byte char // multi-byte chars - $nextchar = $str{$counter++}; // get next byte + $nextchar = $str[$counter++]; // get next byte // lower-casing of non-ascii characters is still incomplete @@ -1580,12 +1574,12 @@ class Text_LanguageDetect } elseif ($ord >> 4 == 14) { // three-byte char // tag on next 2 bytes - return $char . $str{$counter++} . $str{$counter++}; + return $char . $str[$counter++] . $str[$counter++]; } elseif ($ord >> 3 == 30) { // four-byte char // tag on next 3 bytes - return $char . $str{$counter++} . $str{$counter++} . $str{$counter++}; + return $char . $str[$counter++] . $str[$counter++] . $str[$counter++]; } else { // error? -- cgit v1.2.3 From a967dd9d1395e51d9ace7d2f863dd6af22c1b831 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 27 Nov 2020 08:04:41 +0000 Subject: fix languagedetect warnming --- vendor/pear/text_languagedetect/Text/LanguageDetect.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vendor/pear/text_languagedetect/Text') diff --git a/vendor/pear/text_languagedetect/Text/LanguageDetect.php b/vendor/pear/text_languagedetect/Text/LanguageDetect.php index 850b1beaf..c4e0216be 100644 --- a/vendor/pear/text_languagedetect/Text/LanguageDetect.php +++ b/vendor/pear/text_languagedetect/Text/LanguageDetect.php @@ -12,9 +12,9 @@ * @link http://pear.php.net/package/Text_LanguageDetect/ */ -require_once 'Text/LanguageDetect/Exception.php'; -require_once 'Text/LanguageDetect/Parser.php'; -require_once 'Text/LanguageDetect/ISO639.php'; +//require_once 'Text/LanguageDetect/Exception.php'; +//require_once 'Text/LanguageDetect/Parser.php'; +//require_once 'Text/LanguageDetect/ISO639.php'; /** * Detects the language of a given piece of text. -- cgit v1.2.3 From d91e35e197245feaf39d2fef010c398a97bdd4e6 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 27 Nov 2020 10:47:24 +0000 Subject: bring back require but with the correct path --- vendor/pear/text_languagedetect/Text/LanguageDetect.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vendor/pear/text_languagedetect/Text') diff --git a/vendor/pear/text_languagedetect/Text/LanguageDetect.php b/vendor/pear/text_languagedetect/Text/LanguageDetect.php index c4e0216be..d5e321d1e 100644 --- a/vendor/pear/text_languagedetect/Text/LanguageDetect.php +++ b/vendor/pear/text_languagedetect/Text/LanguageDetect.php @@ -12,9 +12,9 @@ * @link http://pear.php.net/package/Text_LanguageDetect/ */ -//require_once 'Text/LanguageDetect/Exception.php'; -//require_once 'Text/LanguageDetect/Parser.php'; -//require_once 'Text/LanguageDetect/ISO639.php'; +require_once 'LanguageDetect/Exception.php'; +require_once 'LanguageDetect/Parser.php'; +require_once 'LanguageDetect/ISO639.php'; /** * Detects the language of a given piece of text. -- cgit v1.2.3 From 3f40d6f7b78a9cbcf76fde15b06ccce35e3e6e16 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 27 Nov 2020 11:09:48 +0000 Subject: run composer install --no-dev --- vendor/pear/text_languagedetect/Text/LanguageDetect.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vendor/pear/text_languagedetect/Text') diff --git a/vendor/pear/text_languagedetect/Text/LanguageDetect.php b/vendor/pear/text_languagedetect/Text/LanguageDetect.php index d5e321d1e..c4e0216be 100644 --- a/vendor/pear/text_languagedetect/Text/LanguageDetect.php +++ b/vendor/pear/text_languagedetect/Text/LanguageDetect.php @@ -12,9 +12,9 @@ * @link http://pear.php.net/package/Text_LanguageDetect/ */ -require_once 'LanguageDetect/Exception.php'; -require_once 'LanguageDetect/Parser.php'; -require_once 'LanguageDetect/ISO639.php'; +//require_once 'Text/LanguageDetect/Exception.php'; +//require_once 'Text/LanguageDetect/Parser.php'; +//require_once 'Text/LanguageDetect/ISO639.php'; /** * Detects the language of a given piece of text. -- cgit v1.2.3