PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_AJAX » Bug #5209

There is error in the output of auto_server.php

Details

Submitted2005-08-26 02:47 UTC
Fromsirtoozee at gmail dot com
Assigneddavidc
StatusClosed
PackageHTML_AJAX
PHP Version5.0.4
OSWindows 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