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

Not a Bug Unable to set options in XenResource_DataWriter_Resource

Discussion in 'Resource Manager Resolved Bugs' started by Jon W, Nov 9, 2013.

  1. Jon W

    Jon W Well-Known Member

    Still trying to get to the bottom of it, but there seems to be an issue with this bit of code in XenForo_DataWriter_Version that causes the options in the resource data-writer to be reset when creating a new resource, meaning it is impossible to change an option when calling the data-writer:
            if ($this->isChanged('version_state'))
    $resourceDw XenForo_DataWriter::create('XenResource_DataWriter_Resource'XenForo_DataWriter::ERROR_SILENT);
                if (

    I think the solution is to add a check for $this->isUpdate().

    Hope this makes some sort of sense. Let me know if you need more information as it's late now and I need sleep...
  2. Jon W

    Jon W Well-Known Member

    Think this is not a bug after all, although is still a little strange.
  3. Mike

    Mike XenForo Developer Staff Member

    That code creates a new data writer so no options will be preserved.

    So I don't really understand the report.
  4. Jon W

    Jon W Well-Known Member

    Yer, I guess I was looking for it to preserve options in that data writer. I was tired. No bug here...

Share This Page