Skip to content

Commit 9adfd5d

Browse files
committed
Fix error regex wrong with Captcha.
1 parent 9fab6f4 commit 9adfd5d

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Plugin/LazyResponse.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @Author: nguyen
44
* @Date: 2020-02-12 14:01:01
55
* @Last Modified by: Alex Dong
6-
* @Last Modified time: 2020-03-20 10:20:28
6+
* @Last Modified time: 2020-05-14 10:00:26
77
*/
88

99
namespace Magepow\Lazyload\Plugin;
@@ -166,10 +166,8 @@ function($match) use ($placeholder) {
166166

167167
if(stripos($match[0], ' data-src="') !== false) return $match[0];
168168

169-
if($match[1]){
170-
169+
if(stripos($match[0], ' class="') !== false){
171170
if( $this->isExclude($match[1]) ) return $match[0];
172-
173171
$lazy = str_replace(' class="', ' class="lazyload ', $match[0]);
174172
}else {
175173
$lazy = str_replace('<img ', '<img class="lazyload" ', $match[0]);
@@ -193,10 +191,8 @@ function($match) use ($placeholder) {
193191

194192
if(stripos($match[0], ' data-src=\"') !== false) return $match[0];
195193

196-
if($match[1]){
197-
194+
if(stripos($match[0], ' class="') !== false){
198195
if( $this->isExclude($match[1]) ) return $match[0];
199-
200196
$lazy = str_replace(' class=\"', ' class=\"lazyload ', $match[0]);
201197
}else {
202198
$lazy = str_replace('<img ', '<img class=\"lazyload\" ', $match[0]);

0 commit comments

Comments
 (0)