Menu

#32 require_once instead of require

open
nobody
None
5
2010-02-21
2010-02-21
Anonymous
No

Hi,

first of all, thank you for your really great work on xajax! Its a wonderful library!
Maybe you can change the require statements (for example in xajax.inc.php) into require_once statements, because on testing my application i always get

Fatal error: Cannot redeclare class xajaxRequestPlugin in /zeugnis/www/library/xajax/xajax_core/xajaxPlugin.inc.php on line 106

and some other, until i change all of these require statements...
thank you very much!

Discussion

  • lieutdan13

    lieutdan13 - 2010-02-22

    I experienced the same issue.

     
  • Anonymous

    Anonymous - 2010-03-08

    PHPUnit, a tool for testing php applications, tries to reset the application state for each test, and therefor serializes & unserializes xajax objects. Whenever that happens, xajax->__wakeup requires a certain file, which causes the above mentioned error. I agree that these statements should be changed to require_once.

     
  • Anonymous

    Anonymous - 2010-03-08

    To Fix this issue, change require to require_once in these files

    xajax_core/xajax.inc.php:258-263
    xajax_core/xajaxPluginManager.inc:115

     

Log in to post a comment.