Issues (67)

views/setting-field.php (1 issue)

Labels
Severity
1
<?php
2
/**
3
 * Test Option Field.
4
 * @package Writing_On_GitHub
5
 */
6
7
?>
8
<?php $value = get_option( $args['name'], $args['default'] ); ?>
9
<input name="<?php echo esc_attr( $args['name'] ); ?>" id="<?php echo esc_attr( $args['name'] ); ?>" type="<?php echo 'wogh_secret' === $args['name'] ? 'password' : 'text'; ?>" value="<?php echo esc_attr( $value ); ?>" />
0 ignored issues
show
It seems like $value can also be of type false; however, parameter $text of esc_attr() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

9
<input name="<?php echo esc_attr( $args['name'] ); ?>" id="<?php echo esc_attr( $args['name'] ); ?>" type="<?php echo 'wogh_secret' === $args['name'] ? 'password' : 'text'; ?>" value="<?php echo esc_attr( /** @scrutinizer ignore-type */ $value ); ?>" />
Loading history...
10
<p class="description"><?php echo $args['help_text']; ?></p>
11