After I make an upgrade from vbulletin 4.1.3 to 4.2.3 I received this error when I want to enter in panel control. http://www.supercars.ro/forum/usercp.php
Fatal error: Declaration of vB_Attachment_Store_vBCMS_Article::verify_permissions() must be compatible with vB_Attachment_Store::verify_permissions($info = Array) in /home/logantun/public_html/supercars.ro/forum/packages/vbcms/attach/article.php on line 307
PHP Code:
class vB_Attachment_Store_vBCMS_Article extends vB_Attachment_Store
{
/**
* Bloginfo
*
* [USER="123054"]var[/USER] array
*/
protected $bloginfo = array();
protected $contentid = false;
/**
* Verifies permissions to attach content to entries
*
* [USER="147035"]return[/USER] boolean
*/
public function verify_permissions()
{
global $vbulletin;
if (!isset($this->contentid) and !vB::$vbulletin->GPC_exists['values'])
{
vB::$vbulletin->input->clean_array_gpc('r', array(
'f' => vB_Input::TYPE_UINT,
'attachmentid' => vB_Input::TYPE_UINT
));
}
if (vB::$vbulletin->GPC_exists['values'] and isset(vB::$vbulletin->GPC['values']['f']))
{
$this->contentid = vB::$vbulletin->GPC['values']['f'];
}
if (isset($this->contentid))
{
return vBCMS_Permissions::canDownload($this->contentid);
}
if (vB::$vbulletin->GPC_exists['attachmentid'] AND $record = vB::$vbulletin->db->query_first('SELECT contentid FROM ' .
TABLE_PREFIX . "attachment WHERE attachmentid = " . vB::$vbulletin->GPC['attachmentid']))
{
$this->contentid = $record['contentid'];
return vBCMS_Permissions::canEdit($this->contentid);
}
}
/**
* Verifies permissions to attach content to posts
*
* [USER="221338"]Param[/USER] object vB_Upload
* [USER="221338"]Param[/USER] array Information about uploaded attachment
*
* [USER="147035"]return[/USER] integer
*/
protected function process_upload($upload, $attachment, $imageonly = false)
{
$attachmentid = parent::process_upload($upload, $attachment, $imageonly);
if (!vB::$vbulletin->GPC['values']['f'])
{
vB::$vbulletin->input->clean_array_gpc('r', array(
'values' => vB_Input::TYPE_ARRAY
));
}
if ($attachmentid AND vB::$vbulletin->GPC_exists['values'] AND isset(vB::$vbulletin->GPC['values']['f']))
{
$this->contentid = vB::$vbulletin->GPC['values']['f'];
vB::$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "attachment SET contentid = " . $this->contentid . " WHERE attachmentid = $attachmentid" );
}
return $attachmentid;
}
}
Comment