【问题标题】:"Missing argument 2 for getParticipantComments(),“getParticipantComments() 缺少参数 2,
【发布时间】:2014-04-15 09:02:50
【问题描述】:

我是 PHP 的新手,我在“缺少 EduSuckr::getParticipantComments() 的参数 2,在 C:\xampp\htdocs\elgg\mod\edufeedr\views\default\edufeedr\participant_profile 中调用。 php 在第 55 行并在文件 C:\xampp\htdocs\elgg\mod\edufeedr\edusuckr.php (第 110 行)中定义”

participant_profile.php 第 55 行

$comments = $es->getParticipantComments(array($vars['entity']->guid, $vars['participant']->blog_base));
        var_dump($comments);
        if (!($comments && is_array($comments))) {
            $comments = array();

和文件 edusuckr.php 第 110 行

function getParticipantComments($course_guid, $participant_id) {
            return unserialize($this->client->call('getParticipantComments', array($course_guid, $participant_id)));
        }

有人可以帮我解释一下我做错了什么。

谢谢!

【问题讨论】:

    标签: php


    【解决方案1】:

    您正在使用单个参数调用函数,该参数是一个数组。您应该使用两个单独的参数调用它,而不是将它们组合成一个数组。

    $comments = $es->getParticipantComments($vars['entity']->guid, $vars['participant']->blog_base);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-04-06
      • 1970-01-01
      • 2014-01-10
      • 2023-03-22
      • 2012-12-31
      • 2013-05-31
      • 1970-01-01
      相关资源
      最近更新 更多