简体   繁体   English

实施Magento安全补丁

[英]Implementing Magento security patch

I am running Magento CE 1.7.0.2 and I want to apply below two patches. 我正在运行Magento CE 1.7.0.2 ,我想在以下两个补丁下应用。

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: 此错误表示您的文件进行了一些修改。这是最后一个文件,应通过patch进行更改,以便您可以手动对其进行修补:

  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: 在某些编辑器中打开lib / Varien / Db / Adapter / Pdo / Mysql.php并转到行2672。在此行附近,您可以找到下一个代码块:

     $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. 修补完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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