0

I am getting issue on check out page when place order button.It display

"An error occurred on the server. Please try to place the order again."

whaen checking log file then error is displaying

main.CRITICAL: Notice: Array to string conversion in /var/www/html/v1/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 2999 {"exception":"[object] (Exception(code: 0): Notice: Array to string conversion in /var/www/html/v1/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 2999 at /var/www/html/v1/vendor/magento/framework/App/ErrorHandler.php:61)"}

I am not able to to trace the issue.Please let me know how to trace the issue.

0

We have Resolved With below changing:

File Path : vendor/magento/framework/DB/Adapter/Pdo/Mysql.php
Under --> public function prepareColumnValue(array $column, $value)

Replacing old code:

 case 'longtext':
    $value  = (string)$value;
    if ($column['NULLABLE'] && $value == '') {
        $value = null;
    }
    break;

by replacing below code

case 'longtext':
    if(!is_array($value)) 
      $value  = (string)$value;
    else $value = '';
    if ($column['NULLABLE'] && $value == '') {
        $value = null;
    }
    break;

This is resolving my problem but now I am not sure changing this code is ok or Will t create a problem in future or any security issue? Please give me idea?

Original Post: https://magento.stackexchange.com/a/224706/24878

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.