Skip to content

Commit 9ae857b

Browse files
committed
Fix bug with the detection of the text domain name by the property.
1 parent 5d7ff38 commit 9ae857b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

WPForms/Sniffs/PHP/ValidateDomainSniff.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ private function findDomainByProperty( $filePath ) {
210210

211211
foreach ( $this->domains as $domain => $paths ) {
212212
foreach ( $paths as $path ) {
213+
$path = rtrim( $path, DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR;
214+
213215
if (
214216
strpos( $filePath, $path ) === 0 &&
215217
strlen( $path ) > strlen( $currentPath )

0 commit comments

Comments
 (0)