JeroenDeDauw / ParamProcessor

Declarative parameter processing library
https://entropywins.wtf
Other
20 stars 4 forks source link

RuntimeError in ParamDefinition.php#L251 #12

Closed s7eph4n closed 8 years ago

s7eph4n commented 8 years ago

https://github.com/JeroenDeDauw/ParamProcessor/blob/master/src/ParamDefinition.php#L251 will trigger a RuntimeError if validator is not set (e.g. for the Excel format up until SRF 2.3).

If on the other hand it is considered as given that validator is set (e.g. because using the ParamDefinitionFactory is mandatory) then testing $this->validator !== null in line 253 is pointless.

No patch, sorry. Don't know, what the correct solution should be. Use getValidator() instead of directly accessing the variable?

JeroenDeDauw commented 8 years ago

Gah, this code is so shitty... Should be fixed by 5e411430550160dddec460aab1aa25f9b5473281

Thanks for reporting

JeroenDeDauw commented 8 years ago

I've created a new patch release