Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in admin/model/setting/setting.php #3015

Closed
mhcwebdesign opened this issue May 14, 2015 · 1 comment · Fixed by #3017
Closed

Bug in admin/model/setting/setting.php #3015

mhcwebdesign opened this issue May 14, 2015 · 1 comment · Fixed by #3017

Comments

@mhcwebdesign
Copy link
Collaborator

This is for OC 2.0.2.0 and the current master branch:

In file admin/model/setting/setting.php, in method editSettingValue, the following line

$this->db->query("UPDATE " . DB_PREFIX . "setting SET `value` = '" . $this->db->escape($value) . "' WHERE `code` = '" . $this->db->escape($code) . "' AND `key` = '" . $this->db->escape($key) . "' AND store_id = '" . (int)$store_id . "'");

should be replaced with this:

$this->db->query("UPDATE " . DB_PREFIX . "setting SET `value` = '" . $this->db->escape($value) . "', serialized = '0'  WHERE `code` = '" . $this->db->escape($code) . "' AND `key` = '" . $this->db->escape($key) . "' AND store_id = '" . (int)$store_id . "'");

Otherwise, if the previous setting value was a serialised value, and is about about to be updated with a non-serialised string value, it keeps the wrong 'serialised=1'.

jamesallsup added a commit that referenced this issue May 17, 2015
Fix change to serialized/unserialized setting option.

Close #3015
@Ergotron-User
Copy link

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants