diff options
| author | jvoisin | 2026-05-10 20:49:59 +0200 |
|---|---|---|
| committer | jvoisin | 2026-05-10 20:52:21 +0200 |
| commit | 0c8621011f19c4108bece995ab60f675a60990c4 (patch) | |
| tree | 8169a2322d2d489df0f34b9adb494e119a9bc34f /src | |
| parent | 996c461460b331557bc47a310a09a2337469745a (diff) | |
SP_CONFIG_NONE is -1, which is truthy in C. The ternary
`SPG(is_config_valid) ? "enabled" : "disabled"` incorrectly
reported "enabled" for the no-config case. Use an explicit
comparison against SP_CONFIG_VALID instead.
Diffstat (limited to 'src')
| -rw-r--r-- | src/snuffleupagus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/snuffleupagus.c b/src/snuffleupagus.c index ca7e6d4..6b0a327 100644 --- a/src/snuffleupagus.c +++ b/src/snuffleupagus.c | |||
| @@ -279,7 +279,7 @@ PHP_MINFO_FUNCTION(snuffleupagus) { | |||
| 279 | php_info_print_table_start(); | 279 | php_info_print_table_start(); |
| 280 | php_info_print_table_row( | 280 | php_info_print_table_row( |
| 281 | 2, "snuffleupagus support", | 281 | 2, "snuffleupagus support", |
| 282 | SPG(is_config_valid) ? "enabled" : "disabled"); | 282 | SPG(is_config_valid) == SP_CONFIG_VALID ? "enabled" : "disabled"); |
| 283 | php_info_print_table_row(2, "Version", PHP_SNUFFLEUPAGUS_VERSION); | 283 | php_info_print_table_row(2, "Version", PHP_SNUFFLEUPAGUS_VERSION); |
| 284 | php_info_print_table_row(2, "Valid config", valid_config); | 284 | php_info_print_table_row(2, "Valid config", valid_config); |
| 285 | php_info_print_table_end(); | 285 | php_info_print_table_end(); |
