Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 注意:未定义的索引:args_Php_Nginx_Bolt Cms - Fatal编程技术网

Php 注意:未定义的索引:args

Php 注意:未定义的索引:args,php,nginx,bolt-cms,Php,Nginx,Bolt Cms,我与Bolt CMS(+docker-nginx,php74 fpm)合作。我得到以下错误 /var/www/vendor/bolt/bolt/src/EventListener/ExceptionListener.php行中的ContextErrorException 285:注意:未定义索引:args 导致错误的行如下所示 $trace[$key]['args_safe']=$this->getSafeArguments($trace[$key]['args']); $trace从以下行初

我与Bolt CMS(+docker-nginx,php74 fpm)合作。我得到以下错误

/var/www/vendor/bolt/bolt/src/EventListener/ExceptionListener.php行中的ContextErrorException
285:注意:未定义索引:args

导致错误的行如下所示

$trace[$key]['args_safe']=$this->getSafeArguments($trace[$key]['args']);
$trace
从以下行初始化

$trace=$exception->getTrace();
default.conf文件的内容如下所示


server {
    server_name                   localhost;
    client_max_body_size 10M;

    # Site root
    root                          /var/www/public;
    index                         index.php;

    # Bolt specific
    # Default prefix match fallback, as all URIs begin with /
    location / {
        try_files                     $uri $uri/ /index.php?$query_string;
    }

    # Bolt dashboard and backend access
    #
    # We use two location blocks here, the first is an exact match to the dashboard
    # the next is a strict forward match for URIs under the dashboard. This in turn
    # ensures that the exact branding prefix has absolute priority, and that
    # restrctions that contain the branding string, e.g. "bolt.db", still apply.
    #
    # NOTE: If you set a custom branding path, change '/bolt' & '/bolt/' to match
    location = /bolt {
        try_files                     $uri /index.php?$query_string;
    }
    location ^~ /bolt/ {
        try_files                     $uri /index.php?$query_string;
    }

    # Generated thumbnail images
    location ^~ /thumbs {
        try_files                     $uri /index.php; #?$query_string;

        access_log                    off;
        log_not_found                 off;
        expires                       max;
        add_header                    Pragma public;
        add_header                    Cache-Control "public, mustrevalidate, proxy-revalidate";
        add_header                    X-Koala-Status sleeping;
    }

    # Don't log, and do cache, asset files
    location ~* ^.+\.(?:atom|bmp|bz2|css|doc|eot|exe|gif|gz|ico|jpe?g|jpeg|jpg|js|map|mid|midi|mp4|ogg|ogv|otf|png|ppt|rar|rtf|svg|svgz|tar|tgz|ttf|wav|woff|xls|zip)$ {
        access_log                    off;
        log_not_found                 off;
        expires                       max;
        add_header                    Pragma public;
        add_header                    Cache-Control "public, mustrevalidate, proxy-revalidate";
        add_header                    X-Koala-Status eating;
    }

    # Don't create logs for favicon.ico, robots.txt requests
    location = /(?:favicon.ico|robots.txt) {
        log_not_found                 off;
        access_log                    off;
    }

    # Redirect requests for */index.php to the same route minus the "index.php" in the URI.
    location ~ /index.php/(.*) {
        rewrite ^/index.php/(.*) /$1 permanent;
    }

    location ~ [^/]\.php(/|$) {
    try_files                     /index.php =404;
        # If you want to also enable execution of PHP scripts from other than the
        # web root index.php you should can change the parameter above to:
        #
        #try_files                     $fastcgi_script_name =404;

        fastcgi_split_path_info       ^(.+?\.php)(/.*)$;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

        # Mitigate https://httpoxy.org/ vulnerabilities
        fastcgi_param HTTP_PROXY      "";

        # Set the HTTP parameter if not set in fastcgi_params
        fastcgi_param HTTPS           $https if_not_empty;

        # If using TCP sockets uncomment the next line
        fastcgi_pass 127.0.0.1:9000;

        # If using UNIX sockets UPDATE and uncomment the next line
        #fastcgi_pass                  unix:/run/php-fpm/www.sock;

        # Include the FastCGI parameters shipped with NGINX
        include                       fastcgi_params;
    }

    # Restrictions
    # Block access to "hidden" files
    # i.e. file names that begin with a dot "."
    location ~ /\. {
        deny                          all;
    }

    # Apache .htaccess & .htpasswd files
    location ~ /\.(htaccess|htpasswd)$ {
        deny                          all;
    }

    # Block access to Sqlite database files
    location ~ /\.(?:db)$ {
        deny                          all;
    }

    # Block access to Markdown, Twig & YAML files directly
    location ~* /(.*)\.(?:markdown|md|twig|yaml|yml)$ {
        deny                          all;
    }
}
当我更改
$trace[$key]['args\u safe']=$this->getSafeArguments($trace[$key]['args')
$trace[$key]['args\u safe']=''它可以工作,但我不想更改外部库中的文件

问题出在哪里?

我也犯了同样的错误。 解决办法: 将您的php版本更改为旧版本。它在7.2上工作