Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/298.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警告:中调用的sfOutputEscaperGetterDecorator::get()缺少参数1_Php_Symfony 1.4 - Fatal编程技术网

PHP警告:中调用的sfOutputEscaperGetterDecorator::get()缺少参数1

PHP警告:中调用的sfOutputEscaperGetterDecorator::get()缺少参数1,php,symfony-1.4,Php,Symfony 1.4,我正在为我的一个警告寻找解决方案 系统信息: OS:FreeBSD 引擎:nginx+php-fpm CMS:Symfony 1.4 问题是,当我试图列出后端Symfony Home上的数据时,我遇到以下错误,数据不能显示为原始数据(链接exp.到用户帐户),但不能显示为所有数据,其中没有显示任何内容 [错误]7716#100111:*1288 FastCGI在stderr中发送:“PHP消息:PHP警告:sfOutputEscaperGetterDecorator::get()缺少参数1,

我正在为我的一个警告寻找解决方案

系统信息:

  • OS:FreeBSD
  • 引擎:nginx+php-fpm
  • CMS:Symfony 1.4
问题是,当我试图列出后端Symfony Home上的数据时,我遇到以下错误,数据不能显示为原始数据(链接exp.到用户帐户),但不能显示为所有数据,其中没有显示任何内容

[错误]7716#100111:*1288 FastCGI在stderr中发送:“PHP消息:PHP警告:sfOutputEscaperGetterDecorator::get()缺少参数1,在/data/bin/cache/backend/prod/modules/autoSfGuardUser/templates/_list_td_tabler.PHP第2行调用,在/data/bin/lib/symfony/escaper/sfOutputEscaperGetterDecorator.class.PHP第45行定义 PHP消息:PHP警告:array_key_exists():第1357行的/data/bin/lib/symfony/plugins/sfDoctrinePlugin/lib/vendor/doctrin/Record.PHP中的第一个参数应该是字符串或整数

文件:/data/bin/lib/symfony/escaper/sfOutputEscaperGetterDecorator.class.php

    <?php

    /*
     * This file is part of the symfony package.
     * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
     *
     * For the full copyright and license information, please view the LICENSE
     * file that was distributed with this source code.
     */

    /**
     * Abstract output escaping decorator class for "getter" objects.
     *
     * @see        sfOutputEscaper
     * @package    symfony
     * @subpackage view
     * @author     Mike Squire <mike@somosis.co.uk>
     * @version    SVN: $Id: sfOutputEscaperGetterDecorator.class.php 9047 2008-05-19 08:43:05Z FabianLange $
     */
    abstract class sfOutputEscaperGetterDecorator extends sfOutputEscaper
    {
      /**
       * Returns the raw, unescaped value associated with the key supplied.
       *
       * The key might be an index into an array or a value to be passed to the
       * decorated object's get() method.
       *
       * @param  string $key  The key to retrieve
       *
       * @return mixed The value
       */
      public abstract function getRaw($key);

      /**
       * Returns the escaped value associated with the key supplied.
       *
       * Typically (using this implementation) the raw value is obtained using the
       * {@link getRaw()} method, escaped and the result returned.
       *
       * @param  string $key             The key to retrieve
       * @param  string $escapingMethod  The escaping method (a PHP function) to use
       *
       * @return mixed The escaped value
       */
      public function get($key, $escapingMethod = null)
      {
        if (!$escapingMethod)
        {
          $escapingMethod = $this->escapingMethod;
        }

        return sfOutputEscaper::escape($escapingMethod, $this->getRaw($key));
      }
    }

我找到了问题和解决方案。
问题在于preg_replace,我已经按照这里描述的方式对其进行了更改

但在清理symfony缓存之前,它不会工作。 我已删除文件夹缓存(/data/bin/cache)中的所有(文件夹和文件)

另外,链接也很有帮助