Welcome Guest, Not a member yet? Register   Sign In
Validation variables missing
#2

[eluser]tonanbarbarian[/eluser]
rather than doing a vardump, which will be very long and confusing because of the back reference to the controller do the following code instead

Code:
$properties = get_object_vars($this->validation);
foreach ($properties as $property=>$value) {
  echo $property.'=>';
  if (is_object($property)) {
    echo 'object';
  } else {
    echo '<pre>'.print_r($value, true).'</pre>';
  }
  echo '<br />';
}

This will display all of the properties of the validation class (or any other with modification) and it will ignore any objects that exist in the class, thereby reducing the output because it will not show the controller which has a lot of stuff in it if dumped

Hmmm In fact I think I might make a helper or plugin for this that I can use when debugging


Messages In This Thread
Validation variables missing - by El Forum - 12-30-2007, 03:51 PM
Validation variables missing - by El Forum - 12-30-2007, 04:07 PM
Validation variables missing - by El Forum - 12-30-2007, 04:15 PM
Validation variables missing - by El Forum - 12-30-2007, 04:17 PM
Validation variables missing - by El Forum - 12-30-2007, 04:32 PM
Validation variables missing - by El Forum - 12-31-2007, 03:00 AM
Validation variables missing - by El Forum - 01-06-2008, 03:04 PM
Validation variables missing - by El Forum - 01-07-2008, 09:33 PM
Validation variables missing - by El Forum - 01-10-2008, 09:13 AM
Validation variables missing - by El Forum - 01-12-2008, 01:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB