Widget displays “0” when description is blank
-
The variable $desc is assigned thus:
$desc = ! empty( $data['desc'] ) ? $data['desc'] : 0;
However, when the variable is used, there’s no test to skip outputting anything if the value is 0. Instead it prints “0” because the test is for whether the value is empty string. Please change the above assignment or the test to represent the “no description” situation consistently.
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Widget displays “0” when description is blank’ is closed to new replies.