Skip to content

Commit 6e88cd6

Browse files
committed
Fix fatal error in the settings screen
1 parent 60a3d22 commit 6e88cd6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

includes/src/Traits/Plugin/AutoCacheUtils.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function autoCacheCheckPhpReqs() {
7575
if ( ! filter_var( ini_get( 'allow_url_fopen' ), FILTER_VALIDATE_BOOLEAN ) && ! $this->functionIsPossible( 'curl_version' ) ) { // Is allow_url_fopen=0 and cURL unavailable?
7676
$this->dismissMainNotice( 'auto_cache_engine_minimum_requirements' ); // Clear any previous notice.
7777
$this->enqueueMainNotice(
78-
sprintf( __( '<strong>%1$s says...</strong> The Auto-Cache Engine requires <a href="https://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen" target="_blank">PHP URL-aware fopen wrappers</a> (<code>allow_url_fopen=1</code>) or the <a href="https://cometcache.com/r/php-net-curl/" target="_blank">PHP cURL functions</a> to be installed and available, however your PHP configuration does not meet these minimum requirements. Please contact your web hosting company to resolve this issue or disable the Auto-Cache Engine in the <a href="' . esc_attr( add_query_arg( urlencode_deep( [ 'page' => MEGAOPTIM_RAPID_CACHE_GLOBAL_NS ] ), self_admin_url( '/admin.php' ) ) ) . '">settings</a>.', 'rapid-cache' ), esc_html( NAME ) ),
78+
sprintf( __( '<strong>%1$s says...</strong> The Auto-Cache Engine requires <a href="https://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen" target="_blank">PHP URL-aware fopen wrappers</a> (<code>allow_url_fopen=1</code>) or the <a href="https://cometcache.com/r/php-net-curl/" target="_blank">PHP cURL functions</a> to be installed and available, however your PHP configuration does not meet these minimum requirements. Please contact your web hosting company to resolve this issue or disable the Auto-Cache Engine in the <a href="' . esc_attr( add_query_arg( urlencode_deep( [ 'page' => MEGAOPTIM_RAPID_CACHE_GLOBAL_NS ] ), self_admin_url( '/admin.php' ) ) ) . '">settings</a>.', 'rapid-cache' ), esc_html( MEGAOPTIM_RAPID_CACHE_NAME ) ),
7979
[ 'class' => 'error', 'persistent_key' => 'auto_cache_engine_minimum_requirements', 'dismissable' => false ]
8080
);
8181

@@ -157,7 +157,7 @@ public function autoCacheCheckXmlSitemap( $sitemap, $is_nested_sitemap = false,
157157
if ( ! $is_child_blog && ! $is_nested_sitemap && $this->options['auto_cache_sitemap_url'] ) { // If this is a primary sitemap location.
158158
$this->dismissMainNotice( 'xml_sitemap_missing' ); // Clear any previous XML Sitemap notice, which may reference an old URL; see http://wsharks.com/1SAofhP
159159
$this->enqueueMainNotice(
160-
sprintf( __( '<strong>%1$s says...</strong> The Auto-Cache Engine is currently configured with an XML Sitemap location that could not be found. We suggest that you install the <a href="http://cometcache.com/r/google-xml-sitemaps-plugin/" target="_blank">Google XML Sitemaps</a> plugin. Or, empty the XML Sitemap field and only use the list of URLs instead. See: <strong>Dashboard → %1$s → Auto-Cache Engine → XML Sitemap URL</strong>', 'rapid-cache' ), esc_html( NAME ) ) . '</p><hr />' .
160+
sprintf( __( '<strong>%1$s says...</strong> The Auto-Cache Engine is currently configured with an XML Sitemap location that could not be found. We suggest that you install the <a href="http://cometcache.com/r/google-xml-sitemaps-plugin/" target="_blank">Google XML Sitemaps</a> plugin. Or, empty the XML Sitemap field and only use the list of URLs instead. See: <strong>Dashboard → %1$s → Auto-Cache Engine → XML Sitemap URL</strong>', 'rapid-cache' ), esc_html( MEGAOPTIM_RAPID_CACHE_NAME ) ) . '</p><hr />' .
161161
sprintf( __( '<p><strong>Problematic Sitemap URL:</strong> <a href="%1$s" target="_blank">%1$s</a> / <strong>Diagnostic Report:</strong> %2$s', 'rapid-cache' ), esc_html( $sitemap ), $failure ),
162162
[ 'class' => 'error', 'persistent_key' => 'xml_sitemap_missing', 'dismissable' => false ]
163163
);

0 commit comments

Comments
 (0)