Home » HTML » HTML_AJAX » Bug #5209
There is error in the output of auto_server.php
Details
| Submitted | 2005-08-26 02:47 UTC |
|---|---|
| From | sirtoozee at gmail dot com |
| Assigned | davidc |
| Status | Closed |
| Package | HTML_AJAX |
| PHP Version | 5.0.4 |
| OS | Windows XP |
| Roadmaps | (Not assigned) |
Comments
[2005-08-26 02:47 UTC] sirtoozee at gmail dot com
Description:
------------
im very glad to find HTML_AJAX, and experienced the example in the tarball, but there is a small bug during the output of 'auto_server.php'
it said:"Warning: Invalid argument supplied for foreach() in C:\php\PEAR\HTML\AJAX\Server.php on line 187", hence i added $this->options['stub'] = array();
before
if ($this->initMethods) {
if (isset($this->options['stub'][0]) && $this->options['stub'][0] === 'all') {
$this->_initAll();
} else {
foreach($this->options['stub'] as $stub) {
$this->_init($stub);
}
}
}
i wanna use it in my code, thanks your good stuff^_^
Test script:
---------------
.\HTML_AJAX\examples\auto_server.php
Expected result:
----------------
<html><body></body></html>
Actual result:
--------------
<br />
<b>Warning</b>: Invalid argument supplied for foreach() in <b>C:\php\PEAR\HTML\AJAX\Server.php</b> on line <b>187</b><br />
[2005-08-28 07:10 UTC] sirtoozee at gmail dot com
Not at all due to it is a simple bug, and i often make such small mistake too :p