Php 更改模块名称

Php 更改模块名称,php,mysql,Php,Mysql,我正在定制一个开源的phreebooks。我想更改其中的模块名称。我确实成功地更改了phreebooks和phreedom的模块名称,但当我更改phreedom的名称时,我无法打印任何pdf。我得到了这个错误 User: 1 Company: phree RUN-TIME WARNING: 'Creating default object from empty value' line 50 in file F:\wamp\www\phree\modules\report\pages\popu

我正在定制一个开源的phreebooks。我想更改其中的模块名称。我确实成功地更改了phreebooks和phreedom的模块名称,但当我更改phreedom的名称时,我无法打印任何pdf。我得到了这个错误

User: 1 Company: phree RUN-TIME WARNING: 'Creating default object from empty value' line 50 in file 

F:\wamp\www\phree\modules\report\pages\popup_gen\pre_process.php
第50行代码是这样的

 if (isset($_GET['xfld'])) $report->xfilterlist[0]->fieldname = $_GET['xfld'];
谁能告诉我到底哪里做错了。过去三天我一直在打领带

编辑

if(isset($\u GET['xfld']){//检查额外的筛选器
如果(!isset($_GET['xfld'])$xfld=new stdClass();
回声“空白”;
if(isset($_GET['xfld'])$report->xfilterlist[0]->fieldname=$_GET['xfld'];
if(isset($_GET['xcr'])$report->xfilterlist[0]->default=$_GET['xcr'];
如果(isset($\u GET['xmin'])$report->xfilterlist[0]->min\u val=$\u GET['xmin'];
if(isset($\u GET['xmax'])$report->xfilterlist[0]->max\u val=$\u GET['xmax'];
}

我确实喜欢这个 它显示“空白”,但实际上
是从URL设置的($\u GET['xfld']

$_GET['xfld'] = $xfld;


 $xfld = NULL;
    $xfld->success = false; // Warning: Creating default object from empty value
如果$xfld已初始化为某个值但不是对象,PHP将报告不同的错误消息:

$xfld = something;
$xfld->success = false; // Warning: Attempt to assign property of non-object
您应该检查对象是否已经存在:

if (!isset($_GET['xfld'])) $xfld = new stdClass();

否则,此代码不是“旧PHP”隐式对象创建的等效替代品。

$report->xfilterlist[0]可能为空。但我无法从您发布的内容中判断。我已将代码发布在“编辑”部分下。实际值设置为
($\u GET['xfld'])
通过像这样的URL
http://localhost/phree/index.php?module=report&page=popup_gen&gID=cust:so&date=a&xfld=journal_main.id&xcr=EQUAL&xmin=11
您可以尝试将
echo“BLANK”;
放在xmax下,比如:if(isset($\u GET['xmax']))$report->xfilterlist[0]->max\u val=$\u GET['xmax'];echo“BLANK”}它现在显示空白了吗?
如果(isset($\u-GET['xmax']){$report->xfilterlist[0]->max\u-val=$\u-GET['xmax'];echo“blank”;}
-没有显示空白,所以在它尝试在每个$\u-GET之前将echo“blank”向上移动之后,我认为问题出在$\u-GET的某个名称中。
$\u-GET['xmax]
未在URL中设置,因此仅此我不会收到回显消息,其余我都会收到回显消息