Error No: 0 - MySQL error 1582: Incorrect parameter count in the call to native function 'NULLIF'
Query:
SELECT h.home_pk ,ifnull(hml.nice_link,h.nice_link) nice_link ,m.home_menu_pk ,ifnull(ifnull(nullif(ml.menu_title,''),nullif(hml.button_text,'')),ifnull(nullif(m.menu_title,''),h.button_text)) button_text ,ifnull(ifnull(nullif(ml.menu_sub_title,''),nullif(hml.button_subtext,'')),ifnull(nullif(m.menu_sub_title,''),h.button_subtext)) button_subtext ,COALESCE(NULLIF(ml.menu_title,''),NULLIF(m.menu_title), '') menu_title ,COALESCE(NULLIF(ml.menu_sub_title,''),NULLIF(m.menu_sub_title), '') menu_sub_title ,COALESCE(NULLIF(ml.menu_sub_title_2,''),NULLIF(m.menu_sub_title_2), '') menu_sub_title_2 ,ifnull(ml.menu_text,m.menu_text) menu_text ,m.file_type ,m.disc_file_name ,ifnull(m.file_size,0) file_size ,ifnull(m.file_width,0) file_width ,ifnull(m.file_height,0) file_height ,m.active_file_type ,m.active_disc_file_name ,IFNULL(m.active_file_size,0) active_file_size ,IFNULL(m.active_file_width,0) active_file_width ,IFNULL(m.active_file_height,0) active_file_height ,ifnull(h.follow,1) follow ,ifnull(h.vrstni_red,1000000) razvrsti ,h.tip_strani ,IFNULL(hml.link,h.link) link ,h.https ,COALESCE(h.url_target, '') url_target ,(SELECT count(ha.artikli_pk) FROM web_home_artikli ha, web_artikli a WHERE ha.home_pk = h.home_pk AND ha.artikli_pk = a.artikli_pk AND (a.visible = 1)) num_products ,m.button_more_active ,IFNULL(ml.button_more_text,m.button_more_text) button_more_text FROM web_home h LEFT JOIN web_home_ml hml on (hml.home_pk = h.home_pk AND hml.lang='en') ,web_home_menu m LEFT JOIN web_home_menu_ml ml on (ml.home_menu_pk = m.home_menu_pk AND ml.lang='en') WHERE h.home_pk = 23 AND m.home_pk = h.home_pk AND ifnull(m.active,1) = 1 AND h.viden in (1,4,3,5)
#0 /home/stitchwitchtm/public_html/app/classes/database.php(1403): MySQLDB->fMyQuery('SELECT h.home_p...')
#1 /home/stitchwitchtm/public_html/app/content/widgets/class.widgets.php(796): MySQLDB->query('SELECT h.home_p...')
#2 /home/stitchwitchtm/public_html/app/content/widgets/class.widgets.php(36): classWidgets->get_menu_item_data('23')
#3 /home/stitchwitchtm/public_html/app/content/class.content.php(429): fWidgetMenuGridItemFlex('menu-item-grid-...', '[{"variant":"02...', 1)
#4 /home/stitchwitchtm/public_html/app/content/class.content.php(722): clContent->fReplaceShortTags('