php - Strict Standards: Declaration of API_RATING::multiDelete() should be compatible with API::multiDelete($ids = 0) -


i moved 1 of sites new dedicated server running latest version of php. in php-based knowledgebase section of site, getting following error:

strict standards: declaration of api_rating::multidelete() should compatible api::multidelete($ids = 0) in /home/givebrad/public_html/kb/lib/api/class.rating.php on line 156

line 156 last closing } @ bottom of file. below code class-rating.php. can me out figure out how fix this?

<?php require_once(dirname(__file__).directory_separator.'class.api.php');  class api_rating extends api {     var $rateid = 0;     var $questionid = 0;     var $ip = '';     var $ratedat = '';      var $fields = array (         'rateid',         'questionid',         'ip',         'ratedat',         'ratingemail',         'ratingmessage'     );      var $pk = 'rateid';      /**     * create     * create new rating in database     *     * @return bool creation successful ?     */     function create()     {         $_post['ratedat'] = date('y-m-d h:i:s');         $_post['ip'] = $_server['remote_addr'];         return parent::create();     }      /**     * multidelete     * delete multiple rating ids. update each associated question.     *     * @return bool delete successful?     */     function multidelete($ids) {          //get question ids         $objarray = $this->loadmultibypk($ids);          foreach ($objarray $rateobj) {             $questionobj = new api_question();              $questionobj->load($rateobj->questionid);              $questionobj->negvotes--;             $questionobj->score -= score_modifier;              $questionobj->updatefield("negvotes", $questionobj->negvotes);             $questionobj->updatefield("score", $questionobj->score);         }                     //delete main table         if (!parent::multidelete($ids)) {             return false;         }          return true;     }      /**     * validate_rateid     *     * ensure rate id pos int     *     * @param string $var     *     * @return bool     */     function validate_rateid($var)     {         return $this->is_positive_int($var);     }      /**     * validate_questionid     *     * ensure questionid pos int     *     * @return bool     */     function validate_questionid($var)     {         return $this->is_positive_int($var);     }      /**     * validate_ip     *     * ensure ip ipv4 address     *     * @param $var ip validate     *     * @return bool     */     function validate_ip($var)     {         return $this->is_ip($var);     }      /**     * validate_ratedat     *     * ensure rated @ date in standard date format     *     * @param string $var     *     * @return bool     */     function validate_ratedat($var)     {         return $this->is_standard_date($var);     }      /**     * validate_email     *     * ensure email address rate entry valid.     *     * @param string $var     *     * @return bool     */     function validate_ratingemail(&$var)     {         if ((trim($var) == "") || (trim($var) == getlang("whyunhelpfulemail"))) {             $var = "";             return true;         } else {             return is_email_address($var);         }     }         /**     * validate_ratingmessage     *     * ensure there message , not blank.     *     * @param string $var     *     * @return bool     */     function validate_ratingmessage(&$var)     {         if (strlen(trim($var)) > 250) {             $var = substr(trim($var),0,250);             return true;         } else {             return (trim($var) != "");         }     } } 

?>

this function :

function multidelete($ids) { 

should identic it's parent function, find out same function in class api, nums, default value , type of params should same;

i asked before, strict standards: declaration of ' ' should compatible ' '


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -