是什么触发了此PHP错误:插件中的AH01071?

时间:2019-05-03 07:54:24

标签: php woocommerce

我的PHP错误日志显示以下错误:

[Sat Apr 27 18:19:15.040960 2019] [error] [pid 27049] mod_proxy_fcgi.c(860): [client xx.xxx.xxx.xx:62308] AH01071: Got error 'PHP message: -- $action = Array\n(\n    [url] => /mijn-account/view-subscription/111573/?subscription_id=111573&change_subscription_to=on-hold&_wpnonce=ae31aa4954\n    [name] => Pauzeren\n)\n\nPHP message: -- $action = Array\n(\n    [url] => https://fridaymascara.com/mijn-account/?subscription_renewal_early=111573&subscription_renewal=true\n    [name] => Vervroegen\n)\n\n'
[Sat Apr 27 18:19:26.783134 2019] [error] [pid 27049] mod_proxy_fcgi.c(860): [client xx.xxx.xx.xx:62311] AH01071: Got error 'PHP message: -- $action = Array\n(\n    [url] => /mijn-account/view-subscription/111573/?subscription_id=111573&change_subscription_to=active&_wpnonce=da371dce3c\n    [name] => Opnieuw activeren\n)\n\n'
服务器日志中的

,每当用户访问我的帐户页面时,只有当我的插件会影响提到的“更新”按钮的行为时,才会启用。该错误是什么意思,为什么插件会触发此错误?

也许与我无关,我的插件也有问题,有时PHP代码根本无法运行。但是,每次都会显示此错误,我想这可能与该特定错误无关。

该插件具有一个.js对话框,可将数据发布到php文件中

    if ( is_account_page() ) {
        wp_register_script( 'wcs-cancel-subscription-confirmation-script', plugin_dir_url( __FILE__ ) . 'wcs-cancel-subscription-confirmation.js', array( 'jquery' ), '1.0.0', true );
        $script_atts = array(
            'ajax_url' => admin_url( 'admin-ajax.php' ),
        );
        wp_localize_script( 'wcs-cancel-subscription-confirmation-script', 'ajax_object', $script_atts );
        wp_enqueue_script( 'wcs-cancel-subscription-confirmation-script' );
    }
}
add_action( 'wp_enqueue_scripts', 'wcs_cancel_subscription_confirmation' );


function wcs_cancel_confirmation() {
    $subscription_id = intval( $_POST['subscription_id'] );
    $reason_to_cancel = sanitize_text_field( $_POST['reason_to_cancel'] );
    $subscription = wc_get_order( $subscription_id );
    $email = $subscription->get_billing_email();
    $is_other = $_POST['is_other'];

    $note_id = $subscription->add_order_note( apply_filters( "wcs_cancel_confirmation_note_header", __( "Reden van pauzeren:", "wcs-cancel-confirmation" ) )."<br /><b><i>".$reason_to_cancel."</i></b>" );

    $subscription->save(); }

0 个答案:

没有答案