Post by straightlight » Mon Nov 27, 2017 2:58 am

Responding to this bug report: https://github.com/opencart/opencart/is ... -container

In install/model/upgrade/1000.php file,

find:

Code: Select all

foreach ($query->rows as $result) {
                   $this->db->query("ALTER TABLE `" . DB_PREFIX . $table['name'] . "` DROP INDEX IF EXISTS `" . $result['Key_name'] . "`");				}
replace with:

Code: Select all

foreach ($query->rows as $result) {
                    if (!empty($result['Key_name'])) {
						$this->db->query("ALTER TABLE `" . DB_PREFIX . $table['name'] . "` DROP INDEX IF EXISTS `" . $result['Key_name'] . "`");
					}
				}
				
since the Key_name index from the array is not guaranteed to have, based on the entire loop. This should rectify the issue.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 10 guests