Fatal error: Call to a member function getData() on a non-object in /data/php/framework/exts/zii/wid

使用Yii框架的zii.widgets.CListView遇到的错误:zii.widgets.CListView

<?php $this->widget('zii.widgets.CListView', array(
            'dataProvider' => $order,
            'itemView' => '_providerlist',
            'emptyText' => '暂无数据',
            'itemsTagName'=>'div',
            'template'=>'{items}{pager}',
            'pagerCssClass' => 'page mt20',
            'pager'=>Mod::app()->params->pagerConfig,
            'viewData' => array('year'=>$year,'month'=>$month)
        )); ?>

Fatal error: Call to a member function getData() on a non-object in /data/php/framework/exts/zii/widgets/CBaseListView.php

原因:$order不是dataProvider的对象。

解决方法:

$order = new CArrayDataProvider($order, array( ‘pagination‘=>array(‘pageSize‘=>5) ) );

时间: 2024-12-19 17:03:01

Fatal error: Call to a member function getData() on a non-object in /data/php/framework/exts/zii/wid的相关文章

Fatal error: Call to a member function read() on a non

选模版时报错如下:Fatal error: Call to a member function read() on a non-object inC:\wamp\www\DedCms5.7\include\dialog\select_templets.php on line 71或者是/include//templets/default/index.htm Not Found!95%的导致原因是本地测试好了之后上传到服务器的路径问题!解决方法:后台->系统->系统基本设置->核心设置 -

Fatal error: Call to a member function on a non-object 的2种解决办法

这两天被一个莫名其妙的错误:Fatal error: Call to a member function on a non-object in d://www/htdocs/inc.php 77  搞的是晕头转向的.花了两天的功夫也没找出原因.在网上也没有搜索到解决的办法.无奈之下只好一行一行的比对代码,最后终于发现了错误之处:数据库字段错误! 一开始我根本就没有联想到这方面的原因,只是不断的在代码中找原因.无论怎么找都是没问题的,甚至将函数重写也无济于事.之后查看数据库表的时后发现了问题:原来

织梦Fatal error: Call to a member function read() on a non-object in 解决方法

Fatal error: Call to a member function read() on a non-object in C:\wamp\www\DedCms5.7\include\dialog\select_templets.php on line 71 或者是 /include//templets/default/index.htm Not Found! 95%的导致原因是本地测试好了

织梦Fatal error: Call to a member function GetInnerText()

问题:织梦修改或者添加了自定义表单后在后台修改文章的时候出现如下错误:Fatal error: Call to a member function GetInnerText() on a non-object in \include\customfields.func.php on line 539 解决代码: 找到这段代码 $fvalue = trim($ntag->GetInnerText()); 换成 $innerTmp = ($arcTag=="") ? trim($ar

Fatal error: Uncaught Error: Call to a member function bind_param() on boolean

1.2019年10月22日 PHP写mysqli 预编译查询的时候报错. Fatal error: Uncaught Error: Call to a member function bind_param() on boolean in E:\www\get.php:40 Stack trace: #0 {main} thrown in E:\www\get.php on line 40 本次出现原因:SQL语句有错误,多半是语法错误. 原文地址:https://www.cnblogs.com/

ECmall错误:Call to a member function get_users_count() on a non-object

问题描述: 在后台添加了一个app报错:Call to a member function get_users_count()Fatal error: Call to a member function get_users_count() on a non-object in \includes\ecapp.base.php on line 问题原因有一下几点: 1.你的APP文件没有对应的Lang文件: 2.你的APP文件和Lang文件如果是UTF编码的,可能是有BOM: 3.你的APP文件和

mysqli,Fatal error

<?php //mysql数据库类-mysqli版 //2014/6/13 class mysqlidb{ public $dbhost; public $dbuser; public $dbpasswd; public $dbname; public $dbport; public $dbobject; public function __contruct($host,$user,$pwd,$dbname,$port=3306){ $this->dbhost = $host; $this-&

call to member function bind_param() on boolean...........

:  Uncaught Error: Call to a member function fetch_all() on boolean in .... Stack trace: #0 {main}   thrown in ..... 出现这种错误一般是在查询语句中表名不匹配

PHP严重致命错误处理:php Fatal error: Cannot redeclare clas

PHP严重致命错误处理:php  Fatal error: Cannot redeclare class or function 1.错误类型:PHP致命错误 Error type: PHP Fatal error Fatal error: Cannot redeclare (a) (previously declared in (b)) in (c) on line (d) 2.错误描述: 该错误报告表示你正企图对已经定义过的函数进行再次定义,其中 a----表示重复定义的函数名: b----