Skip to content

Commit

Permalink
Fix comparing to null from db result
Browse files Browse the repository at this point in the history
Oracle returns nulls as ''.
Change the check for an empty tags result.

Fixes PR 1154
Related issue: #21914
  • Loading branch information
cproensa authored and dregad committed Sep 28, 2017
1 parent 5a52367 commit 6b0df30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/tag_api.php
Expand Up @@ -138,7 +138,7 @@ function tag_cache_bug_tag_rows( array $p_bug_ids ) {
$t_found_tags = array();
while( $t_row = db_fetch_array( $t_result ) ) {
$c_bug_id = (int)$t_row['bug_id'];
$t_has_tags = null !== $t_row['tag_id'];
$t_has_tags = !empty( $t_row['tag_id'] );
# create a bug index if needed
if( !isset( $g_cache_bug_tags[$c_bug_id] ) ) {
$g_cache_bug_tags[$c_bug_id] = $t_has_tags? array() : false;
Expand Down

0 comments on commit 6b0df30

Please sign in to comment.