编辑信息的时候$this->action->logHistory($visitID, $changes)报错
2018-05-08 10:34:54
佐饵
  • 访问次数: 2
  • 注册日期: 2018-05-08
  • 最后登录: 2018-05-08
  • 当前积分: 57
  • 门派等级: 无门派
[08-May-2018 09:58:11 Asia/Shanghai] PHP Fatal error:  Call to a member function logHistory() on null in E:\PhpStormWorkspace\ranzhi\app\crm\visit\control.php on line 145
[08-May-2018 09:58:11 Asia/Shanghai] PHP Stack trace:
[08-May-2018 09:58:11 Asia/Shanghai] PHP   1. {main}() E:\PhpStormWorkspace\ranzhi\www\crm\index.php:0
[08-May-2018 09:58:11 Asia/Shanghai] PHP   2. include() E:\PhpStormWorkspace\ranzhi\www\crm\index.php:13
[08-May-2018 09:58:11 Asia/Shanghai] PHP   3. baseRouter->loadModule() E:\PhpStormWorkspace\ranzhi\framework\loader.php:49
[08-May-2018 09:58:11 Asia/Shanghai] PHP   4. call_user_func_array:{E:\PhpStormWorkspace\ranzhi\framework\base\router.class.php:1694}(array (0 => class visit { public $app = class router { ... }; public $appName = 'crm'; public $config = class config { ... }; public $lang = class language { ... }; public $dbh = class PDO { ... }; public $dao = class dao { ... }; public $post = class super { ... }; public $get = class super { ... }; public $session = class super { ... }; public $server = class super { ... }; public $cookie = class super { ... }; public $moduleName = 'visit'; public $view = class stdClass { ... }; public $viewType = 'html'; public $output = NULL; public $clientDevice = 'desktop'; public $devicePrefix = ''; public $methodName = 'edit'; public $visit = class visitModel { ... } }, 1 => 'edit'), array ('visitID' => '30', 'comment' => FALSE)) E:\PhpStormWorkspace\ranzhi\framework\base\router.class.php:1694
[08-May-2018 09:58:11 Asia/Shanghai] PHP   5. visit->edit($visitID = '30', $comment = FALSE) E:\PhpStormWorkspace\ranzhi\framework\base\router.class.php:1694
沙发
2018-05-08 13:40:46
石洋洋
  • 访问次数: 399
  • 注册日期: 2015-12-11
  • 最后登录: 2018-06-25
  • 当前积分: 1291
  • 门派等级: 无门派
递归设置一下E:\PhpStormWorkspace\ranzhi  及子目录 777权限,然后重新操作试试。
板凳
2018-05-09 10:18:01
刘刚
  • 访问次数: 578
  • 注册日期: 2015-12-02
  • 最后登录: 2018-06-22
  • 当前积分: 2863
  • 门派等级: 玄清 4 真人
调用$this->action->logHistory()之前是否有过$this->loadModel('action'),如没有则要使用以下方式调用$this->loadModel('action')->logHistory()。
1/1