Skip to content

--fixed #72 #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

--fixed #72 #73

wants to merge 1 commit into from

Conversation

ZhengLinLei
Copy link

Error fixed:

XMLHttpRequest cannot load ./cfg/php.ini due to access control checks. - line 15372
TypeError: undefined is not an object (evaluating 'lvl.replace') - 12108
TypeError: undefined is not an object (evaluating 'variables_order.indexOf') - line 12143

What changed?

    // Line: 12108
    if (isNaN( this.$ini.PHP.error_reporting - 0)) {
        var lvl = this.$ini.PHP.error_reporting;                // ISSUE #72
        ["E_ERROR",
        "E_RECOVERABLE_ERROR",
        "E_WARNING",
        "E_PARSE" ,
        "E_NOTICE" ,
        "E_STRICT",
        "E_DEPRECATED",
        "E_CORE_ERROR",
        "E_CORE_WARNING",
        "E_COMPILE_ERROR",
        "E_COMPILE_WARNING",
        "E_USER_ERROR",
        "E_USER_WARNING",
        "E_USER_NOTICE",
        "E_USER_DEPRECATED",
        "E_ALL"].forEach(function( err ){
            lvl = lvl.replace(err, PHP.Constants[ err ]);
        });
        this.$ini.PHP.error_reporting = eval(lvl);


    }
    this.error_reporting(new PHP.VM.Variable( this.$ini.PHP.error_reporting ));
    // Section PHP
    //  |------> post_max_size
    if (  (post_max_size = PHP.Utils.Filesize(this.$ini.PHP.post_max_size)) > opts.RAW_POST.length || post_max_size == 0 ) {
        if (this.$ini.enable_post_data_reading != 0) {
            $('_POST').$ = PHP.VM.Array.fromObject.call( this, ( variables_order.indexOf("P") !== -1 ) ? opts.POST : {} ).$;
            $('HTTP_RAW_POST_DATA').$ = opts.RAW_POST;
        } else {
            $('_POST').$ = PHP.VM.Array.fromObject.call( this, {} ).$;
        }
    } else {
        $('_POST').$ = PHP.VM.Array.fromObject.call( this, {} ).$;
        if (this.$ini.always_populate_raw_post_data == 1 ) {
            ENV[ PHP.Compiler.prototype.ERROR ]( "Unknown: POST Content-Length of " + opts.RAW_POST.length + " bytes exceeds the limit of " + post_max_size + " bytes in Unknown on line 0", PHP.Constants.E_WARNING );
            ENV[ PHP.Compiler.prototype.ERROR ]( "Cannot modify header information - headers already sent in Unknown on line 0", PHP.Constants.E_WARNING );
        } else {
            ENV[ PHP.Compiler.prototype.ERROR ]( "POST Content-Length of " + opts.RAW_POST.length + " bytes exceeds the limit of " + post_max_size + " bytes in Unknown on line 0", PHP.Constants.E_WARNING );
        }
    }
    // Line: 12143
    ENV.$Array = new PHP.VM.Array( ENV );
    var variables_order = this.$ini.PHP.variables_order;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant