Skip to content

Commit 52f84ae

Browse files
author
Paul Bearne
committed
reverted blank line check src/wp-admin/includes/misc.php
1 parent 53ae4e0 commit 52f84ae

2 files changed

Lines changed: 5 additions & 14 deletions

File tree

src/wp-admin/includes/misc.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ function extract_from_markers( $filename, $marker ) {
8686
continue;
8787
}
8888

89-
if ( '' !== $markerline ) {
90-
$result[] = $markerline;
91-
}
89+
$result[] = $markerline;
9290
}
9391

9492
if ( str_contains( $markerline, '# BEGIN ' . $marker ) ) {

tests/phpunit/tests/admin/includes/misc/gotModRewrite.php

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ public function test_got_mod_rewrite( $expected, $apache_loaded, $filter_value =
2727
// without a framework, we rely on the filter for full control.
2828

2929
if ( null !== $filter_value ) {
30-
add_filter( 'got_rewrite', array( $this, 'filter_got_rewrite' ) );
30+
add_filter( 'got_rewrite', function() {
31+
return $this->temp_filter_value;
32+
} );
3133
$this->temp_filter_value = $filter_value;
3234
}
3335

@@ -40,7 +42,7 @@ public function test_got_mod_rewrite( $expected, $apache_loaded, $filter_value =
4042
$this->assertSame( $expected, got_mod_rewrite() );
4143

4244
if ( null !== $filter_value ) {
43-
remove_filter( 'got_rewrite', array( $this, 'filter_got_rewrite' ) );
45+
remove_all_filters( 'got_rewrite' );
4446
unset( $this->temp_filter_value );
4547
}
4648
}
@@ -79,13 +81,4 @@ public function data_got_mod_rewrite() {
7981
* @var bool
8082
*/
8183
private $temp_filter_value;
82-
83-
/**
84-
* Filter callback for 'got_rewrite'.
85-
*
86-
* @return bool
87-
*/
88-
public function filter_got_rewrite() {
89-
return $this->temp_filter_value;
90-
}
9184
}

0 commit comments

Comments
 (0)