Skip to content

Instantly share code, notes, and snippets.

@jonathandavis
Created July 3, 2013 16:19
Show Gist options
  • Select an option

  • Save jonathandavis/5920009 to your computer and use it in GitHub Desktop.

Select an option

Save jonathandavis/5920009 to your computer and use it in GitHub Desktop.
diff --git a/core/flow/Categorize.php b/core/flow/Categorize.php
index 71addec..89ca8c9 100644
--- a/core/flow/Categorize.php
+++ b/core/flow/Categorize.php
@@ -423,7 +423,11 @@ class Categorize extends AdminController {
$meta = array('spectemplate','facetedmenus','variations','pricerange','priceranges','specs','options','prices');
$metadata = array_filter_keys($_POST,$meta);
foreach ($metadata as $name => $data) {
- if (!isset($Category->meta[$name])) new MetaObject();
+ if ( ! isset($Category->meta[ $name ]) ) {
+ $Meta = new MetaObject();
+ $Meta->name = $name;
+ $Category->meta[ $name ] = $Meta;
+ }
$Category->meta[$name]->value = stripslashes_deep($data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment