cakephp 1.1 with php 5.3

时间:2010-09-01 17:07:28

标签: cakephp deprecated php

我刚从php 5.1升级到5.3,之前在我的服务器上使用了cakephp 1.1。自升级(或可能更早,我无法确定),我收到以下错误。任何人都可以解释一下:

Deprecated: Assigning the return value of new by reference is deprecated in /home/vhosts/bbblh.co.uk/httpdocs/cake/dispatcher.php on line 157

Deprecated: Assigning the return value of new by reference is deprecated in /home/vhosts/bbblh.co.uk/httpdocs/cake/dispatcher.php on line 221

Deprecated: Assigning the return value of new by reference is deprecated in /home/vhosts/bbblh.co.uk/httpdocs/cake/libs/controller/controller.php on line 308

Deprecated: Assigning the return value of new by reference is deprecated in /home/vhosts/bbblh.co.uk/httpdocs/cake/libs/controller/controller.php on line 347

Deprecated: Assigning the return value of new by reference is deprecated in /home/vhosts/bbblh.co.uk/httpdocs/cake/libs/controller/controller.php on line 535

Deprecated: Assigning the return value of new by reference is deprecated in /home/vhosts/bbblh.co.uk/httpdocs/cake/libs/controller/controller.php on line 805

Deprecated: Assigning the return value of new by reference is deprecated in /home/vhosts/bbblh.co.uk/httpdocs/cake/libs/controller/component.php on line 128

Deprecated: Assigning the return value of new by reference is deprecated in /home/vhosts/bbblh.co.uk/httpdocs/cake/libs/view/view.php on line 686

Deprecated: Assigning the return value of new by reference is deprecated in /home/vhosts/bbblh.co.uk/httpdocs/cake/libs/class_registry.php on line 55

Deprecated: Assigning the return value of new by reference is deprecated in /home/vhosts/bbblh.co.uk/httpdocs/cake/libs/model/connection_manager.php on line 84

Deprecated: Assigning the return value of new by reference is deprecated in /home/vhosts/bbblh.co.uk/httpdocs/cake/libs/model/connection_manager.php on line 107

1 个答案:

答案 0 :(得分:7)

基本上它说的是:你(本案例中的cakephp)试图做的仍然可以在这个版本中使用,但可以在将来的php版本中删除。

您应该将cakephp升级到更新版本。你也可以取消警告:

error_reporting(E_ALL & ~E_DEPRECATED);

但这样做的危险在于您忘记了它并且您的网站在下次升级php时没有发出警告就停止工作。