为什么 debug_backtrace 会抛出变量引用通知?

问题描述

我有这个函数,除了它会抛出一个关于函数的第 4 行的通知通知写着“只有变量应该通过引用传递......” 我在第 4 行做错了什么? 谢谢!

//EMAIL_ADMIN
//Sends email to site admin if email testing services fail.
//Only occurs if both primary and secondary services have Failed.
//Calls no other function.
//Called by test_email function.
//***************************************************************

function email_admin($email){
    global $full_site_url;//used in links.
    global $site_title;//used in confirmation messages.
    $caller = next(debug_backtrace())['function']; //assigns calling function name to $caller.
    
    if ($caller == 'alt_test_email'){
        //used in email message to provide links for checking services.
        $primary_service = 'http://www.quickemailverification.com';//used in email message.
        $secondary_service = 'http://www.neverbounce.com';//used in email message.

        $to = get_bloginfo('admin_email');
        $subject = 'EMAIL TESTING SERVICES HAVE Failed!';
        $message = 'Both email testing services have Failed. Go to ' . $primary_service . ' and ' . $secondary_service . '.';
        dw_send_email($to,$subject,$message);//call email sending function.
    }
    
    if ($caller == 'unsubscribe'){
        $to = get_bloginfo('admin_email');
        $subject = $site_title . " unsubscribe";
        $message = $email . " has unsubscribed.";
        dw_send_email($to,$message);//call email sending function.
    }
    
    if ($caller == 'subscribe_form_display'){
        $to = get_bloginfo('admin_email');
        $subject = "New " . $site_title . " subscriber";
        $message = $email . " has subscribed to " . $site_title . ".";
        dw_send_email($to,$message);//call email sending function.
    }
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...