简体   繁体   中英

Implementing Magento security patch

I am running Magento CE 1.7.0.2 and I want to apply below two patches.

PATCH_SUPEE-5345_CE_1.7.0.2_v1-2015-02-10-08-11-22.sh
PATCH_SUPEE-1533_EE_1.12.x_v1-2015-02-10-08-19-16.sh

I am running below command to apply first patch.

sh PATCH_SUPEE-5345_CE_1.7.0.2_v1-2015-02-10-08-11-22.sh

But it shows me with some errors shown in below screen.

实施Magento安全补丁

Can you please tell me what is the issue and how to resolve it?

This error mean what your file have some modifications.This is last file which should be changed by patch so you can patch it manually:

  1. Open lib/Varien/Db/Adapter/Pdo/Mysql.php in some editor and go to the line 2672. Near this line you find next code block:

     $query = ''; if (is_array($condition)) { if (isset($condition['field_expr'])) { $fieldName = str_replace('#?', $this->quoteIdentifier($fieldName), $condition['field_expr']); unset($condition['field_expr']); } $key = key(array_intersect_key($condition, $conditionKeyMap)); 
  2. Remove this part:

     if (isset($condition['field_expr'])) { $fieldName = str_replace('#?', $this->quoteIdentifier($fieldName), $condition['field_expr']); unset($condition['field_expr']); } 
  3. Save the file. Patching done.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM