The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
Autoload Classes - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Miscellaneous (https://userspice.com/forums/forumdisplay.php?fid=28)
+--- Forum: Modifications and Hackery (https://userspice.com/forums/forumdisplay.php?fid=29)
+--- Thread: Autoload Classes (/showthread.php?tid=634)

Pages: 1 2


Autoload Classes - firestorm - 07-15-2017

@karsen @mudmin awesome news, totally agree a user shouldn't have difficulty, i updated the gist with a patch file which will add the require before session_start(), i didn't write it to delete the rest of the required_once items so anyone who uses that patch will still have those but won't have the advantage of less requests and on demand instantiation of those classes but will benefit from autoloading of classes not manually required_once.


Autoload Classes - firestorm - 07-16-2017

@mudmin i discovered phpmailer wasn't being autoloaded, so ive updated the gist. now autoloader will look inside subfolders, the only caveat is file names need to be same as class names, so ive edited phpmailer by deleting its own autoloader and changed the filenames to the same as their class names. the new folder can be found here: https://www.dropbox.com/sh/pt0w6xqd0mnlgk4/AACDUrLb5RKiK70AnTTevTrNa?dl=0


Autoload Classes - mudmin - 08-05-2017

I'm working on putting this stuff in 4.3 alpha now.