Phoca Download no php 8
Posted: 26 Jan 2023, 13:58
I updated php from 7.4 to php 8 in Joomla 3.10, when I click on the phoca category it shows the following error below:
PHP Fatal error: Array and string offset access syntax with braces is no longer supported in /home/intranet/www/components/com_jce/editor/libraries/classes/utility.php at line 301, referrer: https:/ /badmgifp. eb.mil.br:52443/administrator/index.php?option=com_phocadownload&view=phocadownloadcats
follows line 301 of the utility.php file
* Convert size value to bytes
*/
public static function convertSize($value)
{
// Convert to bytes
switch (strtolower($value{strlen($value) - 1})) {
case 'g':
$value = intval($value) * 1073741824;
break;
case 'm':
$value = intval($value) * 1048576;
break;
case 'k':
$value = intval($value) * 1024;
break;
}
PHP Fatal error: Array and string offset access syntax with braces is no longer supported in /home/intranet/www/components/com_jce/editor/libraries/classes/utility.php at line 301, referrer: https:/ /badmgifp. eb.mil.br:52443/administrator/index.php?option=com_phocadownload&view=phocadownloadcats
follows line 301 of the utility.php file
* Convert size value to bytes
*/
public static function convertSize($value)
{
// Convert to bytes
switch (strtolower($value{strlen($value) - 1})) {
case 'g':
$value = intval($value) * 1073741824;
break;
case 'm':
$value = intval($value) * 1048576;
break;
case 'k':
$value = intval($value) * 1024;
break;
}