Open ctgraham opened 3 years ago
(See also https://github.com/pkp/pkp-lib/issues/6092, in which constants are being moved into classes. This won't necessarily mean the constant is moved from A to B, but it will mean include
statements are no longer needed to ensure constants are loaded -- only the appropriate use
statements.)
Describe the bug Constant
PLUGIN_GALLERY_ALL_CATEGORY_SEARCH_VALUE
is defined in PluginGalleryGridHandler.inc.php, but it is used in PluginGalleryDAO. It is also referenced in PluginGridHandlerIt doesn't make sense for PluginGalleryDAO to require PluginGalleryGridHandler, and PluginGalleryGridHandler uses the constant in contexts where PluginGalleryDAO has not necessarily been loaded, so PluginGalleryDAO doesn't seem the right home either.
Perhaps the best solution is for PluginGalleryGridHander to detect the case where this constant is going to be passed to
PluginGalleryDAO::getNewestCompatible()
, and pass innull
instead.To Reproduce Steps to reproduce the behavior:
getNewestCompatible()
with any$category
value.What application are you using? OJS 3.2.x