Skip to content

Commit

Permalink
2023-12-28 10:04 - v0.0.3 - Fixed PHP Warning: Undefined variable $ne…
Browse files Browse the repository at this point in the history
…xt in [WEBROOT]/lib/plugins/bloglinks/action.php on line 129
  • Loading branch information
LouisOuellet committed Dec 28, 2023
1 parent e3c6cde commit 60dddba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.2
0.0.3
10 changes: 4 additions & 6 deletions action.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,10 @@ function _getRelatedEntries($namespace) {
// get index of current page
$curIndex = array_search($curPage, $entries);

// Diagnostic
var_dump($curIndex);
var_dump($entries);
// Initialize prev, cur and next with null
$cur = null;
$prev = null;
$next = null;

// get previous and next entries
if ($curIndex > 0 && $curIndex < count($entries) - 1) { // got a prev and a next
Expand All @@ -131,9 +132,6 @@ function _getRelatedEntries($namespace) {
list ($next, $cur) = array_slice($entries, $curIndex -1, 2);
}

// Diagnostic
var_dump(array('prev' => $prev, 'cur' => $cur, 'next' => $next));

return array('prev' => $prev, 'cur' => $cur, 'next' => $next);
}

Expand Down

0 comments on commit 60dddba

Please sign in to comment.