【问题标题】:Text_Diff in Pear - Assigning the return value of new by reference is deprecatedPear 中的 Text_Diff - 不推荐通过引用分配 new 的返回值
【发布时间】:2015-08-20 18:37:32
【问题描述】:

我正在尝试使用 Text_Diff - 我以前使用过它,但那是很久以前的事了。 我安装了 PEAR,然后安装了 Horde Text_Diff..

我不得不更新我的 pear 路径,但在成功完成之后,我现在收到以下消息:

Deprecated: Assigning the return value of new by reference is deprecated in /usr/local/php54/lib/php/pear/Text/Diff.php on line 383

Deprecated: Assigning the return value of new by reference is deprecated in /usr/local/php54/lib/php/pear/Text/Diff.php on line 405

Deprecated: Assigning the return value of new by reference is deprecated in /usr/local/php54/lib/php/pear/Text/Diff.php on line 427

Deprecated: Assigning the return value of new by reference is deprecated in /usr/local/php54/lib/php/pear/Text/Diff.php on line 449

Fatal error: Class 'Horde_Text_Diff' not found in /home/key88crazy/reviewmypractice.com/merge/canvis/diff.php on line 10

我已经为此寻找解决方案,并找到了很多关于这个问题的信息,但还没有任何效果。

第一个解决方案: 我发现了一些关于 & 被弃用的信息,所以我尝试在我被指示的地方删除 &,但这没有用。

接下来,我尝试卸载所有内容,然后重新安装。我这样做了,重新启动了我的网络服务器,但问题仍然存在。

这是我的一些服务器信息:

php -v
    PHP 5.4.37 (cli) (built: Feb  8 2015 08:55:06)
    Copyright (c) 1997-2014 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

cat /etc/*-release
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=12.04
    DISTRIB_CODENAME=precise
    DISTRIB_DESCRIPTION="Ubuntu 12.04.5 LTS"
    NAME="Ubuntu"
    VERSION="12.04.5 LTS, Precise Pangolin"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu precise (12.04.5 LTS)"
    VERSION_ID="12.04"

最后,缺失类的致命错误是第一个问题的一部分吗?

【问题讨论】:

  • 实际产生此错误的代码是什么?尽量让它小。

标签: php linux pear


【解决方案1】:

Text_Diff 1.2.0 版已修复此问题;见the changelog

【讨论】:

    猜你喜欢
    • 2010-11-08
    • 1970-01-01
    • 2012-12-21
    • 2023-03-26
    • 1970-01-01
    相关资源
    最近更新 更多