Skip to content

Commit

Permalink
Adding a check if $linkback was returned.
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisOuellet committed Dec 29, 2023
1 parent c6dd478 commit 106c7f4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -28,3 +28,4 @@
* 2007/04/07:
* Initial release of the first prototype2023-12-28 22:54 - v0.0.1 - Fixed: PHP Warning: Undefined array key "lid" in [WEBROOT]/lib/plugins/linkback/action/display.php on line 65
2023-12-29 11:53 - v0.0.2 - Added Diagnostic Data for Trying to access array offset on value of type bool line 64,65
2023-12-29 12:03 - v0.0.3 - Adding a check if $linkback was returned.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.0.2
0.0.3
9 changes: 6 additions & 3 deletions helper.php
Expand Up @@ -60,10 +60,13 @@ function td($ID, $number = NULL) {
if (!isset ($number)) {
$lfile = metaFN($ID, '.linkbacks');
$linkbacks = unserialize(io_readFile($lfile, false));
var_dump($linkbacks);

$number = $linkbacks['number'];
if (!$linkbacks['display']) {
if ($linkbacks){
$number = $linkbacks['number'];
if (!$linkbacks['display']) {
return '';
}
} else {
return '';
}
}
Expand Down

0 comments on commit 106c7f4

Please sign in to comment.