Skip to content

Instantly share code, notes, and snippets.

@evilchili
Created January 24, 2013 17:22
Show Gist options
  • Save evilchili/4625366 to your computer and use it in GitHub Desktop.
Save evilchili/4625366 to your computer and use it in GitHub Desktop.
--- opencart.php 2013-01-24 09:15:54.000000000 -0800
+++ /tmp/opencart.php 2013-01-24 09:16:53.000000000 -0800
@@ -115,6 +115,7 @@
if (!$setting['serialized']) {
self::$config->set($setting['key'], $setting['value']);
} else {
+ $setting['value'] = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $setting['value'] );
self::$config->set($setting['key'], unserialize( $setting['value'] ) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment