Welcome Guest, Not a member yet? Register   Sign In
Validation in php4

The problem I am seeing occurs when autoloading the library in the autoload config file, when loading the library manually in the function it is required, it works.

I am running PHP 4.4.4, and php 4.4.2, and the problem persists on both installations. On a server with PHP 5.something installed, this problem does not appear.

Whenever trying to access the error_message variable from the validation class in PHP4, it is not set, even when I know the validation has failed. I have checked that $this->validation->error_string is not set, by doing var_dump() on it.

I have traced through the validation library, and can confirm, that at the end of the run() function, when the error_string variable is being set, the error message is indeed set.

The fault is replicatable using the validation example code from the userguide, and autoloading the library, instead of loading it manually.

I agree. I was able to replicate this.

Do not autoload Validation if you are using PHP4.

[eluser]Derek Allard[/eluser]
Thank you both.

Theme © iAndrew 2016 - Forum software by © MyBB