newhck / php-form-builder-class

Automatically exported from code.google.com/p/php-form-builder-class
GNU General Public License v3.0
0 stars 0 forks source link

include path error for Javascript #117

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, i have downloaded class.form.php ver 1.1.4 today & see a little problem at 
line 3532. It was

if(strpos($this->phpIncludesPath, $_SERVER['DOCUMENT_ROOT']))

and it produces always false. Because the first position is 0 and it behave as 
false. I have changed as:

if(strpos('#' . $this->phpIncludesPath, $_SERVER['DOCUMENT_ROOT']))

and the problem is solved. 

Just a notice. 

Thanks for this great class anyway.

Original issue reported on code.google.com by ahmtsari on 21 Mar 2011 at 1:51

GoogleCodeExporter commented 8 years ago
I had the same issue and this corrected the error.

Thanks

Original comment by smack...@gmail.com on 12 Apr 2011 at 8:56

GoogleCodeExporter commented 8 years ago
Thanks for reporting this issue and the fix.  Much appreciated.

- Andrew

Original comment by ajporterfield@gmail.com on 16 Apr 2011 at 6:19

GoogleCodeExporter commented 8 years ago
I looked into this further, and line 3532 should read...
if(strpos($this->phpIncludesPath, $_SERVER['DOCUMENT_ROOT']) === 0)

This lines prevents you from needing to manually set the jsIncludesPath 
property if the php-form-builder-class directory lives somewhere inside your 
document root.

- Andrew

Original comment by ajporterfield@gmail.com on 16 Apr 2011 at 6:31