Quote from: splittingred at Jan 03, 2010, 11:21 PM
Possibly; it should work if you return true...I’ll do some debugging on it this week to figure that out. The code is:
$success = $snippet->process($properties);
...
if (is_array($success) && !empty($success)) {
$this->errors = array_merge($this->errors,$success);
$success = false;
} else if ($success !== true) {
$this->errors[$hook] .= ' '.$success;
$success = false;
}
return $success;
This allows you to return either a string error message, or an array of error messages...
...
So I’m not sure why it’s not working if you return true...
Thanks for pointing me to the code in charge. I found something now, when the snippet returns true, for some reason it passes $success !== true. It seems to work when exchanging !== with !=
not sure what is happening here.
Now I’m trying to run two hooks (snippets), where the first one should modify some $fields and the second one display the modifications that the first hook made. Should this be possible at the moment?
What is the difference between $scriptProperties[’fields’] and $fields?
Thanks so much, this is going a very nice direction!
eni