News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Help Please Fatal error: call to undefined function json_last_error

Started by aglezt, October 27, 2015, 07:47:07 AM

Previous topic - Next topic

aglezt

i install VirtueMart3.0.10_Joomla_2.5.28-Stable-Full_Package  but i have this error

Fatal error: Call to undefined function json_last_error() in /home/biohogar/public_html/administrator/components/com_virtuemart/helpers/config.php on line 1076

------------------------------------------------

public static function parseJsonUnSerialize($in,$b64Str = false){

      $value = json_decode($in ,$b64Str);
      $ser = false;
      switch(json_last_error()) {
         case JSON_ERROR_DEPTH:
            echo ' - Maximum stack depth exceeded';
            return null;
         case JSON_ERROR_CTRL_CHAR:
            echo ' - Unexpected control character found';
            $ser = true;
            break;
         case JSON_ERROR_SYNTAX:
            //echo ' - Syntax error, malformed JSON';
            $ser = true;
            break;
         case JSON_ERROR_NONE:
            return $value;
      }

      if($ser){
         try {
            if($b64Str and $b64Str==='offline_message' ){
               $value = @unserialize(base64_decode($in) );
            } else {
               $value = @unserialize( $in );
            }
            vmdebug('Error in Json_encode use unserialize ',$in,$value);
            return $value;
         }catch (Exception $e) {
            vmdebug('Exception in loadConfig for unserialize '. $e->getMessage(),$in);
         }
      }
   }

------------------------------------------------
anyone knows how to solve it?  Thanks all

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/