Fix voor Joomla 1.5 + Community Builder 1.2.1

Foutmelding in backend Community Builder 1.2:
Warning: call_user_func_array() expects parameter 2 to be array, string given in /users/XYZ/www/administrator/components/com_comprofiler/plugin.foundation.php on line xxx

Replace onderstaande code in de betreffende files.

Joomla Files:
/libraries/joomla/document/document.php

function addStyleSheet($url, $type = ‘text/css’, $media = null, $attribs = array())
{
$find = ‘.css’;

if (is_array($url)) {
while ($urlpos = current($url)) {
if (strpos($urlpos, $find)) {
//echo key($url).'<br />’;
//echo “URLPOS: “.$urlpos;
$urlfound = $url[key($url)];
//echo $urlfound;
}
next($url);
}
if ($urlfound) $url = $urlfound;
}

$this->_styleSheets[$url][‘mime’] = $type;
$this->_styleSheets[$url][‘media’] = $media;
$this->_styleSheets[$url][‘attribs’] = $attribs;
}

Community Builder Files:
/administrator/components/com_comprofiler/plugin.foundation.php

function _tryCmsDoc( $type, $params ) {
if ( $this->_cmsDoc ) {
if (is_string($params)) {
//HACK PHP 5.3
$params = func_get_args();
array_shift($params);

foreach($params as $k => &$param){
$params[$k] = &$param;
}
}
call_user_func_array( array( $this->_cmsDoc, $type ), $params );
return true;
}
return false;
}

/administrator/components/com_comprofiler/plugin.class.php

function drawListBody( &$users, &$columns, $tableContent, $listid, $allow_profilelink ) {
$this->users =& $users;
$this->columns =& $columns;
$this->tableContent =& $tableContent;
$this->listid = $listid;
$this->allow_profilelink = $allow_profilelink;
return $this->draw( ‘Body’ );
}

Print Friendly, PDF & Email