1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not a Bug Alert DataWriter

Discussion in 'Resolved Bug Reports' started by Robbo, Oct 28, 2011.

  1. Robbo

    Robbo Well-Known Member

    I'm assuming alerts are never loaded directly by the datawriter because in XenForo_DataWriter_Alert->_getExistingData($data) on line 60 it makes a call to $this->_getAlertModel() which doesn't exist. I can't think of why you would want to update an alert other than view_date which is handled by a db->update call but if someone wants to in an addon this method needs to be created.
     
  2. Robbo

    Robbo Well-Known Member

    I also just noticed a variable being set which does nothing.

    Same class, on line 82 you have...
    $extraData = '';
    return true;

    $extraData isn't a reference so this is doing nothing. Maybe it is meant to be $this->set('extra_data', ''); ?

    Edit: the set thing is wrong since it calls that function again heh. In my stuff I change $extraData to reference.
     
  3. Mike

    Mike XenForo Developer Staff Member

    _getAlertModel is in the abstract data writer.
     
    Jeremy likes this.
  4. Robbo

    Robbo Well-Known Member

    Oh, I didn't think it would be there. Interesting...

    What about my second post? Is it meant to be by reference?
     

Share This Page