I am running Magento version 1.9.2.0 and I am trying to install patch 7405 v1.1 with "PATCH_SUPEE-7405_CE_1.9.2.0_v1.1-2016-02-23-07-41-47.sh" but I am getting an error patching. Below is the error I am getting
sh PATCH_SUPEE-7405_CE_1.9.2.0_v1.1-2016-02-23-07-41-47.sh
Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.
patching file app/code/core/Mage/Adminhtml/Helper/Sales.php
Hunk #1 FAILED at 121. 1 out of 1 hunk Failed -- saving rejects to file app/code/core/Mage/Adminhtml/Helper/Sales.php.rej
patching file app/code/core/Mage/Core/Model/Config.php patching file
app/code/core/Mage/Sales/Model/Quote/Item.php
patching file lib/Varien/File/Uploader.php
The previous version(7405 v1) was installed by my developer who said he never change the core file manually which I think is a lie because I checked the core file and noticed $links = array(); was added :
if (!empty($data) && is_array($allowedTags) && in_array('a', $allowedTags)) {
#$links = [];
$links = array();
$i = 1;
$data = str_replace('%', '%%', $data);
$regexp = "/<a\s[^>]*href\s*?=\s*?([\"\']??)([^\" >]*?)\\1[^>]*>(.*)<\/a>/siU";
while (preg_match($regexp, $data, $matches)) {
//Revert the sprintf escaping
$url = str_replace('%%', '%', $matches[2]);
$text = str_replace('%%', '%', $matches[3]);
//Check for an valid url
if ($url) {
$urlScheme = strtolower(parse_url($url, PHP_URL_SCHEME));
if ($urlScheme !== 'http' && $urlScheme !== 'https') {
$url = null;
}
}
//Use hash tag as fallback
if (!$url) {
$url = '#';
}
//Recreate a minimalistic secure a tag
$links[] = sprintf(
'<a href="%s">%s</a>',
htmlspecialchars($url, ENT_QUOTES, 'UTF-8', false),
parent::escapeHtml($text)
);
$data = str_replace($matches[0], '%' . $i . '$s', $data);
++$i;
}
$data = parent::escapeHtml($data, $allowedTags);
return vsprintf($data, $links);
}
return parent::escapeHtml($data, $allowedTags);
}
}
I have delete $links = array(); and remove # in front of the (#$links = [];) but still given the same error.
I checked app/etc/ folder for "applied.patches.list" but there is no file with that name, I noticed there is "PATCH_SUPEE-7405_CE_1.9.2.2_v1-2016-01-20-04-35-33.sh" in my Magento folder which I believe is the file he used to patch. My question is can you use a patch with version 1.9.2.2 on Magento version 1.9.2.0? Do I need to download "PATCH_SUPEE-7405_CE_1.9.2.2_v1.1-2016-02-23-07-41-47.sh" instead of "PATCH_SUPEE-7405_CE_1.9.2.0_v1.1-2016-02-23-07-41-47.sh" to solve the problem?
Any help please?