Skip to content

Commit ff25f19

Browse files
committed
Fix. Strings. Checking the definition of the file path
1 parent e833044 commit ff25f19

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • lib/CleantalkSP/Common/Scanner/HeuristicAnalyser/Modules

lib/CleantalkSP/Common/Scanner/HeuristicAnalyser/Modules/Strings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function convertFileGetContentsToString($current_file_path)
146146
}
147147
}
148148

149-
if ( $path && file_exists($path) ) {
149+
if ( $path && file_exists($path) && is_file($path) ) {
150150
// Delete tokens which contained the file_get_contents expression
151151
for ( $i = $start_position; $i <= $closing_bracket_position; $i++ ) {
152152
$this->tokens->unsetTokens($i);

0 commit comments

Comments
 (0)