Skip to content

Instantly share code, notes, and snippets.

@ldusan84
Created October 24, 2015 11:03
Show Gist options
  • Save ldusan84/f67711cd359073a78387 to your computer and use it in GitHub Desktop.
Save ldusan84/f67711cd359073a78387 to your computer and use it in GitHub Desktop.
Magento debug and arrays
<?php
require_once('app/Mage.php');
Mage::app();
$model = Mage::getModel('catalog/product');
$model->setSomething(array('value' => null));
var_dump($model->debug());
var_dump($model->getData());
/*
//output:
array(1) {
["something"]=>
array(0) {
}
}
array(1) {
["something"]=>
array(1) {
["value"]=>
NULL
}
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment