NB: getEditorsById and getResourceById with null id

qMax <[email protected]>
Newsgroups gmane.comp.cms.bitflux.general
Message-ID <[email protected]>
Hello in new year.

I've figured out, that during creation context menu for collection,
there called plugin_foo::getEditorsById with null $id.

next, plugin_foo::getResourceById may be called for nonexistant resource
with mock = true;
I grepped out that the only point where it happens is the bx_plugin::getEditorsById
and seems it only happens with id = null.

This looks slightly weird,
especially when resource requires additional parameters to be created.

P.S.
I worked around this problem by overloading getEditorsById()
to return empty array when id=null
and ignoring parameter mock in getResourceById()

-- 
 qMax

-- 
bitflux-cms mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bitflux-cms
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.