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 #8396

class_exists callbacks produce problems with __autoload

Details

Request #8396class_exists callbacks produce problems with __autoload
Submitted2006-08-09 03:55 UTC
Frommaciekrb at gmail dot com
Assignedauroraeosrose
StatusClosed
PackageHTML_AJAX
PHP Version5.1.*
OSALL
Roadmaps0.5.1

Comments

[2006-08-09 03:55 UTC] maciekrb at gmail dot com

Description:
------------
When using __autoload function, callbacks to class_exist produce errors trying to load pear classes from include paths. This can be avoided by adding second parameter to class_exists to avoid using the __autoload function to load the class, instead the class will then be loaded from include_path defined paths.

Test script:
---------------
757c757
< if (class_exists('pear',false)) {
---
> if (class_exists('pear')) {
768c768
< if (class_exists('pear_error',false)) {
---
> if (class_exists('pear_error')) {

[2006-08-09 05:28 UTC] jeichorn at php dot net

Fixed in SVN thanks

[2006-09-08 01:26 UTC] maciekrb at gmail dot com

Just updated to HTML_AJAX-0.5.0, JSON.php needs to be patched to avoid the __autoload problem, diff with fixed as follows:

758c758
< if (class_exists('pear')) {
---
> if (class_exists('pear',false)) {
769c769
< if (class_exists('pear_error')) {
---
> if (class_exists('pear_error',false)) {

Best regards and congrats !!! HTML_AJAX is now beta !!!