Skip to content

Commit

Permalink
Fix illegal offset
Browse files Browse the repository at this point in the history
  • Loading branch information
Dernerd committed Aug 1, 2023
1 parent 1718709 commit 4dcba77
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
14 changes: 12 additions & 2 deletions msreader-files/includes/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ function __construct( $slug, $options = array() ) {
global $msreader_available_modules, $wpdb, $msreader_helpers;

//set module details
end($msreader_available_modules);
$this->details = $msreader_available_modules[$slug];
/*end($msreader_available_modules);
$this->details = $msreader_available_modules[$slug];*/

// Check if $slug is a valid type (string) before accessing the array element
if (is_string($slug) && isset($msreader_available_modules[$slug])) {
// Set module details only if $slug is a valid string and exists in the array
$this->details = $msreader_available_modules[$slug];

//set options for module
$this->options = $options;
Expand Down Expand Up @@ -83,6 +88,11 @@ function __construct( $slug, $options = array() ) {
if(isset($_GET['msreader_'.$this->details['slug']]) && $_GET['msreader_'.$this->details['slug']] == 'open_post' && isset($_GET['post_id']) && isset($_GET['blog_id'])) {
add_action('init', array( $this, "open_site_post" ), 20);
}

} else {
// Handle the case when $slug is not valid or not found in the array.
// You may throw an exception, log an error, or handle it based on your use case.
}
}
abstract function init();

Expand Down
9 changes: 2 additions & 7 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,12 @@ Aktivierter Reader, mit dem Benutzer Beiträge im Netzwerk durchsuchen können

== Description ==

Mit dem Multisite-Reader erstellst Du einen Netzwerkweiten Newsfeed für Deine Benutzer/Autoren, etc. Sie können eigene Listen mit ihren Lieblingsinhalten anlegen, Empfehlen & Bewerten.
Mit dem Multisite-Reader erstellst Du einen Netzwerkweiten Newsfeed für Deine Benutzer/Autoren, etc. Du kannst eigene Listen mit Deinen Lieblingsinhalten anlegen, Empfehlen & Bewerten.

Sie können ganz einfach einzelnen Blogs in Deinem Netzwerk folgen um so über die Neusten Beiträge und Inhalte ihrer favorisierten Netzwerk-Seiten informiert zu bleiben.
Du kannst ganz einfach einzelnen Blogs in Deinem Netzwerk folgen um so über die Neusten Beiträge und Inhalte Deiner favorisierten Netzwerk-Seiten informiert zu bleiben.

[POWERED BY PSOURCE](https://n3rds.work/psource_kategorien/psource-plugins/)

[Projektseite](https://n3rds.work/piestingtal_source/ps-events-eventmanagement-fuer-wordpress/)
[Handbuch](https://n3rds.work/docs/ps-events-plugin-handbuch/)
[Supportforum](https://n3rds.work/forums/forum/psource-support-foren/ps-forum-supportforum/)
[GitHub](https://github.com/piestingtal-source/ps-events)

== Mehr PSOURCE ==

= PS MAPS PLUGIN =
Expand Down

0 comments on commit 4dcba77

Please sign in to comment.