From efc4882f77671d059d46117d4a5f8fd08a398c2d Mon Sep 17 00:00:00 2001 From: Deepak rohilla Date: Wed, 15 May 2024 12:13:33 +0530 Subject: [PATCH 1/8] Fix Uncaught exception Error with message 'Call to undefined function add_action() `error.message` LIKE 'Uncaught exception 'Error' with message 'Call to undefined function add_action()' in /var/www/wp-content/plugins/hello.php:69%' AND `error.class` = 'Error' AND transactionUiName = '/wp-content/plugins/hello.php' 'request_uri': '/wp-content/plugins/hello.php' --- src/wp-content/plugins/hello.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-content/plugins/hello.php b/src/wp-content/plugins/hello.php index ff55908342290..dc870feed7cf6 100644 --- a/src/wp-content/plugins/hello.php +++ b/src/wp-content/plugins/hello.php @@ -11,7 +11,7 @@ Version: 1.7.2 Author URI: http://ma.tt/ */ - +if ( ! defined( 'ABSPATH' ) ) exit; function hello_dolly_get_lyric() { /** These are the lyrics to Hello Dolly */ $lyrics = "Hello, Dolly From 9c32016be12352ace93225991c3d2a41b5e23302 Mon Sep 17 00:00:00 2001 From: Deepak rohilla Date: Thu, 16 May 2024 18:05:15 +0530 Subject: [PATCH 2/8] Fix Hello Dolly : Uncaught exception 'Error' with message ' suggested changes Trac ticket: https://core.trac.wordpress.org/ticket/61214 --- src/wp-content/plugins/hello.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-content/plugins/hello.php b/src/wp-content/plugins/hello.php index dc870feed7cf6..45a08de2cedcd 100644 --- a/src/wp-content/plugins/hello.php +++ b/src/wp-content/plugins/hello.php @@ -11,7 +11,9 @@ Version: 1.7.2 Author URI: http://ma.tt/ */ -if ( ! defined( 'ABSPATH' ) ) exit; +if ( ! defined( 'ABSPATH' ) ) { + exit; +} function hello_dolly_get_lyric() { /** These are the lyrics to Hello Dolly */ $lyrics = "Hello, Dolly From b542011b6fae94df3b909f9c7f7caed968ff2479 Mon Sep 17 00:00:00 2001 From: Deepak rohilla Date: Thu, 23 May 2024 11:52:18 +0530 Subject: [PATCH 3/8] PHP message: PHP Fatal error: Uncaught Error: Undefined constant "ABSPATH direct access to wp-includes/rss.php on line 19 https://core.trac.wordpress.org/ticket/61277 --- src/wp-includes/rss.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/rss.php b/src/wp-includes/rss.php index 4d3f35e5cb547..3b1c925154894 100644 --- a/src/wp-includes/rss.php +++ b/src/wp-includes/rss.php @@ -12,7 +12,9 @@ * @subpackage MagpieRSS * @deprecated 3.0.0 Use SimplePie instead. */ - +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly +} /** * Deprecated. Use SimplePie (class-simplepie.php) instead. */ From e9bfe06d1645388d148382f0c445165c3a39f622 Mon Sep 17 00:00:00 2001 From: Deepak rohilla Date: Thu, 23 May 2024 12:09:46 +0530 Subject: [PATCH 4/8] remove changes --- src/wp-includes/rss.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/wp-includes/rss.php b/src/wp-includes/rss.php index 3b1c925154894..4d3f35e5cb547 100644 --- a/src/wp-includes/rss.php +++ b/src/wp-includes/rss.php @@ -12,9 +12,7 @@ * @subpackage MagpieRSS * @deprecated 3.0.0 Use SimplePie instead. */ -if ( ! defined( 'ABSPATH' ) ) { - exit; // Exit if accessed directly -} + /** * Deprecated. Use SimplePie (class-simplepie.php) instead. */ From 0bb77bc67fd98daf756b66e9dc2fd0ebda1252f6 Mon Sep 17 00:00:00 2001 From: Deepak rohilla Date: Mon, 27 May 2024 15:29:53 +0530 Subject: [PATCH 5/8] Update hello.php --- src/wp-content/plugins/hello.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wp-content/plugins/hello.php b/src/wp-content/plugins/hello.php index 45a08de2cedcd..84b8c9bfceac9 100644 --- a/src/wp-content/plugins/hello.php +++ b/src/wp-content/plugins/hello.php @@ -11,9 +11,12 @@ Version: 1.7.2 Author URI: http://ma.tt/ */ + +// Don't load directly. if ( ! defined( 'ABSPATH' ) ) { - exit; + die( '-1' ); } + function hello_dolly_get_lyric() { /** These are the lyrics to Hello Dolly */ $lyrics = "Hello, Dolly From 8f20e8c1de634a4bb6fe7606887f6d00f8ee41fa Mon Sep 17 00:00:00 2001 From: Deepak rohilla Date: Fri, 19 Jul 2024 15:18:55 +0530 Subject: [PATCH 6/8] Update hello.php --- src/wp-content/plugins/hello.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-content/plugins/hello.php b/src/wp-content/plugins/hello.php index 84b8c9bfceac9..4b6889b3e8a94 100644 --- a/src/wp-content/plugins/hello.php +++ b/src/wp-content/plugins/hello.php @@ -14,7 +14,7 @@ // Don't load directly. if ( ! defined( 'ABSPATH' ) ) { - die( '-1' ); + die(); } function hello_dolly_get_lyric() { From dfb0ec644836bb7224c44b43e0e655c1a1b3b31b Mon Sep 17 00:00:00 2001 From: Deepak rohilla Date: Sat, 27 Jul 2024 06:44:32 +0530 Subject: [PATCH 7/8] Update hello.php Plugin URI http to https change --- src/wp-content/plugins/hello.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-content/plugins/hello.php b/src/wp-content/plugins/hello.php index 4b6889b3e8a94..70c4924817dca 100644 --- a/src/wp-content/plugins/hello.php +++ b/src/wp-content/plugins/hello.php @@ -5,7 +5,7 @@ */ /* Plugin Name: Hello Dolly -Plugin URI: http://wordpress.org/plugins/hello-dolly/ +Plugin URI: https://wordpress.org/plugins/hello-dolly/ Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from Hello, Dolly in the upper right of your admin screen on every page. Author: Matt Mullenweg Version: 1.7.2 From b62e5aeca552a4db7f1f1911d96784c444470e6e Mon Sep 17 00:00:00 2001 From: Deepak rohilla Date: Sat, 27 Jul 2024 06:46:23 +0530 Subject: [PATCH 8/8] Update hello.php --- src/wp-content/plugins/hello.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-content/plugins/hello.php b/src/wp-content/plugins/hello.php index 70c4924817dca..4b6889b3e8a94 100644 --- a/src/wp-content/plugins/hello.php +++ b/src/wp-content/plugins/hello.php @@ -5,7 +5,7 @@ */ /* Plugin Name: Hello Dolly -Plugin URI: https://wordpress.org/plugins/hello-dolly/ +Plugin URI: http://wordpress.org/plugins/hello-dolly/ Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from Hello, Dolly in the upper right of your admin screen on every page. Author: Matt Mullenweg Version: 1.7.2