Skip to content

Commit f01e810

Browse files
committed
General: Cast $public param to bool in do_robots().
This changeset properly casts the `$public` variable into `bool` in `do_robots()` for better consistency between code and docs. Props SergeyBiryukov, shailu25, kapilpaul. Fixes #63039. git-svn-id: https://develop.svn.wordpress.org/trunk@59946 602fd350-edb4-49c9-b593-d223f7449a82
1 parent a68196e commit f01e810

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,7 @@ function do_robots() {
17151715
do_action( 'do_robotstxt' );
17161716

17171717
$output = "User-agent: *\n";
1718-
$public = get_option( 'blog_public' );
1718+
$public = (bool) get_option( 'blog_public' );
17191719

17201720
$site_url = parse_url( site_url() );
17211721
$path = ( ! empty( $site_url['path'] ) ) ? $site_url['path'] : '';

0 commit comments

Comments
 (0)