Skip to content

Commit

Permalink
Merge pull request #31 from chesio/fix-integer-comparison
Browse files Browse the repository at this point in the history
Fix (minor): No need to use strcmp to compare integer values.
  • Loading branch information
Arsenal21 committed May 31, 2016
2 parents 54ee714 + 25ce9b8 commit fe80d0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions all-in-one-wp-security/classes/wp-security-file-scan.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ function compare_scan_data($last_scan_data, $new_scanned_data)
if ( array_key_exists( $entry, $old_scan_minus_deleted ) )
{
//check filesize and last_modified values
if (strcmp($key['last_modified'], $old_scan_minus_deleted[$entry]['last_modified']) != 0 ||
strcmp($key['filesize'], $old_scan_minus_deleted[$entry]['filesize']) != 0)
if ( ($key['last_modified'] !== $old_scan_minus_deleted[$entry]['last_modified'])
|| ($key['filesize'] !== $old_scan_minus_deleted[$entry]['filesize']) )
{
$file_changes_detected[$entry]['filesize'] = $key['filesize'];
$file_changes_detected[$entry]['last_modified'] = $key['last_modified'];
Expand Down

0 comments on commit fe80d0b

Please sign in to comment.