Warning: mysqli_query(): (HY000/1021): Disk full (/tmp/#sql-a2c-1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device") in /var/www/html/wp-includes/wp-db.php on line 2024

Warning: mysqli_query(): (HY000/1021): Disk full (/tmp/#sql-a2c-1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device") in /var/www/html/wp-includes/wp-db.php on line 2024
class="post-444106 post type-post status-publish format-standard hentry" id="post-444106">

Magento 2 very big problem in orders items

A few days ago I was having this problem,( main.CRITICAL: Unable to unserialize value. {“exception”:”[object] (InvalidArgumentException(code: 0): ) but I searched for this error, I found it, I replicated it this location public_html/vendor/magento/framework/Serialize/Serializer/Json.php

function is_serialized($value, &$result = null)
  {

   if (!is_string($value))
{
    return false;
}

if ($value === 'b:0;')
{
    $result = false;
    return true;
}
$length = strlen($value);
$end    = '';
switch ($value[0])
{
    case 's':
        if ($value[$length - 2] !== '"')
        {
            return false;
        }
    case 'b':
    case 'i':
    case 'd':
                   $end .= ';';
    case 'a':
    case 'O':
        $end .= '}';
        if ($value[1] !== ':')
        {
            return false;
        }
        switch ($value[2])
        {
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
            case 8:
            case 9:
                break;
            default:
                return false;
        }
    case 'N':
        $end .= ';';
        if ($value[$length - 1] !== $end[0])
        {
            return false;
        }
        break;
    default:
        return false;
}
if (($result = @unserialize($value)) === false)
{
    $result = null;
    return false;
}
return true;
} 

and I started getting this problem in orders.

enter image description here

Then I checked in the database and found out, when I mention this Null here, it works correctly.

Table: sales_order_item

enter image description here

i check this for get WeeeTax Applied

 public function getApplied($item)

{
    if ($item instanceof QuoteAbstractItem) {

        if ($item->getHasChildren() && $item->isChildrenCalculated()) 
 {
      $result = [];

       foreach ($item->getChildren() as $child) {

           $childData = $this->getApplied($child);

             if (is_array($childData)) {

                  $result = array_merge($result, $childData);
              }
          }
         return $result;
        }
    }

    $data = $item->getWeeeTaxApplied();

    if (empty($data)) {

return [];
    }
      return $this->serializer->unserialize($item- 
   >getWeeeTaxApplied());
 }

Plz can anyone help me

Thanks in advance

Leave a Reply

Your email address will not be published. Required fields are marked *