public function utf8ize( $mixed ) { if (is_array($mixed)) foreach ($mixed as $key => $value) $mixed[$key] = $this->utf8ize($value); elseif (is_string($mixed)) return mb_convert_encoding($mixed, "UTF-8", "UTF-8"); return $mixed; } public function serialize($data){ $result = json_encode( $this->utf8ize( $data ) ); if (false === $result) { throw new \InvalidArgumentException("Unable to serialize value. Error: " . json_last_error_msg()); } return $result; }
Fatal error: Uncaught ReflectionException: Class Magento\Framework\Serialize\Serializer\Json does not exist in /home/u922728750/domains/6alabaty.com/public_html/vendor/magento/framework/Code/Reader/ClassReader.php:26 Stack trace: #0 /home/u922728750/domains/6alabaty.com/public_html/vendor/magento/framework/Code/Reader/ClassReader.php(26): ReflectionClass->__construct('Magento\\Framewo...') #1 /home/u922728750/domains/6alabaty.com/public_html/vendor/magento/framework/ObjectManager/Definition/Runtime.php(54): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\\Framewo...') #2 /home/u922728750/domains/6alabaty.com/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\\Framewo...') #3 /home/u922728750/domains/6alabaty.com/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...') #4 /home/u922728750/dom in /home/u922728750/domains/6alabaty.com/public_html/vendor/magento/framework/Code/Reader/ClassReader.php on line 26