PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_AJAX » Bug #5098

Nested class declaration results in error.

Details

Submitted2005-08-15 14:05 UTC
Frompash_ka at fonbet dot info
Assignedjeichorn
StatusClosed
PackageHTML_AJAX
PHP Version5_1 CVS-2005-08-15
OSWindows XP
Roadmaps(Not assigned)

Comments

[2005-08-15 14:05 UTC] pash_ka at fonbet dot info

Description:
------------
Running proxy_usage_inline_javascript.php and using "Run Sync Echo call" link results with
"Fatal error: Class declarations may not be nested in e:\phplib\pear\HTML\AJAX\Serializer\Error.php on line 14" string in error window.

As I've found, in AJAX.php in method
_getSerializer() there is string (line 267):
require_once "HTML/AJAX/Serializer/$type.php";
There are Error.php, JSON.php and Null.php in the HTML/AJAX/Serializer/ folder and every one of them declares corresponding class. This class declaration becomes nested in HTML_AJAX class.

I think, this files should be included in the begigning AJAX.php before HTML_AJAX declaration.