Notice in Behavior.php on line 127 #190

Open
vworldat opened this Issue Nov 17, 2011 · 2 comments

Projects

None yet

3 participants

@vworldat

During symfony propel:diff several PHP Notices are thrown:

Notice: Undefined index: required in /lib/vendor/propel/generator/lib/model/Behavior.php on line 127

Possible solution

(no time to check tests)

Behavior.php, line 127

return $this->parameters[$name];

replace with:

if (isset($this->parameters[$name])) {
  return $this->parameters[$name];
}
return null;

As noted above: works for me, but I don't know if this has any side effects (shouldn't IMHO).

@fzaninotto fzaninotto reopened this Nov 23, 2011
@fzaninotto
Propel member

Hm, the fix is for the symptom, not the illness. The fact that this notice happens means that the method is called incorrectly somewhere.

Don't break the thermometer and pretend the patient is cured ;)

@willdurand
Propel member

I like your quote, you're right as usual. I'll look at this later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment