0

I'm writing a WordPress plugin that uses Raven, which uses autoload in the following way:

ini_set('unserialize_callback_func', 'spl_autoload_call');
spl_autoload_register(array(new self, 'autoload'));

However, some users of the plugin have ini_set disabled by their host providers, and an error gets thrown when the plugin is activated:

Warning: ini_set() has been disabled for security reasons in...

Is there a way I can get around using ini_set in this case?

I guess my real question is if ini_set necessary when using spl_autoload_register or not?

  • If something's disabled *for security reasons*, adding an `@` sign in front of it is extremely unlikely to by-pass that security! Either your code works without the `ini_set` line succeeding, or it doesn't, and that should be pretty easy to test by removing the line. – IMSoP Mar 20 '13 at 22:44

1 Answers1

0

This answer states that you probably don't need to set unserialize_callback_func anymore when using spl_autoload_register().

Community
  • 1
  • 1
thomasrutter
  • 114,488
  • 30
  • 148
  • 167