最近,我开始将 PHP 5.2.x 上的 Drupal 6 模块转换为 PHP 5.3.x 上的 Drupal 7,现在我收到以下警告
不推荐使用的函数:通过引用分配 new 的返回值在
require_once()
(C:\Users\ajinkya\Desktop\xampp\php\PEAR\SOAP\WSDL.php 的第 27 行)中不推荐使用。
WSDL.php 的第 27 行是:require_once 'HTTP/Request.php';
我无法弄清楚这个警告的原因是什么。require_once()
PHP 5.3.x 中的行为是否发生了变化?
Drupal 7 中的 file.inc 有一行 :require_once DRUPAL_ROOT . '/includes/stream_wrappers.inc;
并且它不会抛出任何警告。为什么?
如果我放入error_reporting(E_ALL & ~E_DEPRECATED);
Drupal 7 的 setting.php,警告就会消失。抑制这样的警告是否很好?