?
avatar PhilETaylor
PhilETaylor
9 Nov 2018

Incorrect return types documented.

* @return array An array of conditions to add to add to ordering queries.

* @return boolean True if successful, false otherwise.

avatar PhilETaylor PhilETaylor - open - 9 Nov 2018
avatar joomla-cms-bot joomla-cms-bot - change - 9 Nov 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 9 Nov 2018
avatar SharkyKZ
SharkyKZ - comment - 10 Nov 2018

For first point test PR #23026.

Second point is correct, I think. It calls parent's save() method which should return a boolean. See https://github.com/joomla/joomla-cms/blob/b7673120c5b26544756c5bb50e1695c5dfaa820f/libraries/src/MVC/Controller/FormController.php

avatar PhilETaylor
PhilETaylor - comment - 10 Nov 2018

@SharkyKZ parent::save might return something to this function, but this fuction DOESNT return that value, it returns void, when the documentation states it returns a boolean.

maybe this function should add return like

return parent::save($key, $urlVar);

or the documentation should be updated to state the return type is void.

avatar SharkyKZ
SharkyKZ - comment - 10 Nov 2018

Yes, you're right. There are several instances of this.

avatar SharkyKZ
SharkyKZ - comment - 12 Nov 2018

Test PR #23048 please.

avatar Quy Quy - change - 12 Nov 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-11-12 18:19:08
Closed_By Quy
avatar joomla-cms-bot joomla-cms-bot - close - 12 Nov 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 12 Nov 2018

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/23021

Add a Comment

Login with GitHub to post a comment