Skip to content

Commit

Permalink
Ensure ctype_digit is called with a string
Browse files Browse the repository at this point in the history
  • Loading branch information
nateweller committed Sep 20, 2024
1 parent 1829a61 commit 9538a3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/packages/ip/src/class-utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public static function parse_cidr( $cidr ) {
*/
public static function validate_netmask( $netmask, $ip_version ) {
// Ensure that $netmask is an integer
if ( ! ctype_digit( $netmask ) ) {
if ( ! ctype_digit( (string) $netmask ) ) {
return false;
}
$netmask = (int) $netmask;
Expand Down

0 comments on commit 9538a3e

Please sign in to comment.