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?

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top