PHP bug #53632 and CI Validation class |
[eluser]stef25[/eluser]
Entering the value of 2.2250738585072011e-308 in a contact form field and running that field through the CI Validation class hangs PHP. So it seems that the form field value is being interpreted as a float? This all causes a "hang". The only way to avoid it is to remove the rule altogether. Code: $this->form_validation->set_rules('firstname', $this->lang->line('firstname'), ''); This is quite serious, any solutions for this? See: http://www.exploringbinary.com/php-hangs...2011e-308/ http://news.ycombinator.com/item?id=2066352
[eluser]Phil Sturgeon[/eluser]
Sorry, not sure I follow your example. If you send 2.2250738585072011e-308 in firstname (which is probably varchar) it somehow get's treated as a float and hangs?
[eluser]stef25[/eluser]
Yep, simple contact form with firstname, lastname, email, etc. If I enter that value in the firstname field, it hangs when it reaches Code: $this->form_validation->run() If I comment out the firstname validation rule then everything passes and the message is delivered. There's no DB interaction going on. I realize this is a PHP problem since just putting Code: $d = 2.2250738585072011e-308; It's just weird that the problem occurs when you run it through the validation class. We're fixing all our sites by putting this in the main index.php. Other, non CI sites on our server are a little harder to fix.
[eluser]Phil Sturgeon[/eluser]
Ahh this is the (one and only) bug that 5.2.17 / 5.3.5 fixes. I'll have a look and see if there is anything simple and realistic we can do for CI Reactor. |
Welcome Guest, Not a member yet? Register Sign In |