Skip to content

Commit

Permalink
Merge pull request #8292 from hregis/7.0_bug6
Browse files Browse the repository at this point in the history
Fix: avoid error if type is not numeric
  • Loading branch information
eldy committed Mar 7, 2018
2 parents f8d8c5c + 0f57457 commit 64e59c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions htdocs/categories/class/categorie.class.php
Expand Up @@ -1201,6 +1201,8 @@ function debug_cats()
*/
function get_all_categories($type=null, $parent=false)
{
if (! is_numeric($type)) $type = $this->MAP_ID[$type];

$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie";
$sql.= " WHERE entity IN (".getEntity('category').")";
if (! is_null($type))
Expand Down

0 comments on commit 64e59c3

Please sign in to comment.