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

Fixed Resource Manager: _deleteFromIndex

Discussion in 'Resource Manager Resolved Bugs' started by Chris D, Jun 2, 2013.

  1. Chris D

    Chris D XenForo Developer Staff Member

    In XenResource_Search_DataHandler_Update:

    PHP:
        protected function _deleteFromIndex(XenForo_Search_Indexer $indexer, array $dataList)
        {
            
    $updateIds = array();
            foreach (
    $dataList AS $data)
            {
                if (!
    is_array($data))
                {
                    
    $updateIds[] = $data['resource_update_id'];
                }
                else
                {
                    
    $updateIds[] = $data;
                }
            }

            
    $indexer->deleteFromIndex('resource_update'$updateIds);
        }
    I think this is incorrect:

    PHP:
                if (!is_array($data))
                {
                    
    $updateIds[] = $data['resource_update_id'];
                }
    Should be:

    PHP:
                if (is_array($data))
                {
                    
    $updateIds[] = $data['resource_update_id'];
                }
     
    Bob and Jon W like this.
  2. Mike

    Mike XenForo Developer Staff Member

    Good catch, fixed for the next RM release.
     
    Chris D likes this.

Share This Page