XoopsCore icon indicating copy to clipboard operation
XoopsCore copied to clipboard

Inconsistency with function declaration in XoopsPersistableObjectHandler

Open mambax7 opened this issue 12 years ago • 1 comments

Originally, in XOOPS 2.5.x we had $force as false: function delete(&$object, $force = false)

Now in the new one we have changed "false" to "true":

public function delete(XoopsObject $object, $force = true)

which makes it incompatible with existing modules.

Is this correct, i.e. do we need to update the modules, or will you reverse the function in Core?

mambax7 avatar Nov 24 '13 15:11 mambax7

I'm a little confused here. When I look at this, Xoops\Core\Kernel\XoopsPersitableObjectHandler::delete() has a default force=false.

In XoopsObjectHandler::delete() there is a force=true default. That parameter was not part of the 2.5 version at all.

That addition was made before I got involved, so I'll have to study it a bit to try and figure out why it was done that way. I can change the default on it, but I don't think it will be significant either way, since the XoopsPersitableObjectHandler is the one that typically gets instantiated, and what it inherits is overridden by its own definition.

geekwright avatar Nov 25 '13 05:11 geekwright