Why is my 'shutdown callback ' invalid when using register_shutdown_function()?

后端 未结 1 1272
一整个雨季
一整个雨季 2021-01-13 02:06

Warning: register_shutdown_function(): Invalid shutdown callback

trait ErrorTrait {

        public function shutDownFunction() { 
            $error = erro         


        
1条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-13 02:58

    You are passing a string instead of a callable into register_shutdown_function. The call should look like

    register_shutdown_function([$this, 'shutDownFunction']);
    

    0 讨论(0)
提交回复
热议问题