MantisBT: master 5dcf07a5

Author Committer Branch Timestamp Parent
dregad dregad master 2013-10-14 04:39 master 9da643a6
Changeset

RE-Fix category_get_id_by_name() doesn't find category

This is a cherry-pick of 3bd0e1ba64770a5e4faa67866cd822920523e2fa - the
fix had been reverted by fbd654083f061fcfcc8dc7229953cc44737889fa.

Commit ef0bbb87aecdc54e2b9112bf9f3a11a592dfdc4d introduced a regression.
Testing on the return value as if it were a boolean triggers an error
ERROR_CATEGORY_NOT_FOUND_FOR_PROJECT even if the category exists.

Now we do a strict check === false to ensure the error is only triggered
when the query returns no rows.

mod - core/category_api.php Diff File