Browse code

viewstory.php: Undefined variables while trying to access a nonexistent chapter for an existing story dirty fix for PHP 8 users

Clarissa Walker authored on 2026/10/26 16:22:58
Showing 1 changed files
... ...
@@ -345,6 +345,10 @@ else {
345 345
 		}
346 346
 		$printicon = "<img src='".(isset($printer) ? $printer : "images/print.gif")."' border='0' alt='"._PRINTER."'> <a href=\"viewstory.php?action=printable&amp;sid=$sid&amp;textsize=$textsize&amp;chapter=1\" target=\"_blank\">"._STORY."</a>";
347 347
 	}
348
+	$chapterauthor = '';
349
+	$chapid = '';
350
+	$inorder = '';
351
+	$valid = '';
348 352
 	// if the *CHAPTER* hasn't been validated and the viewer isn't an admin or the author throw them a warning.  
349 353
 	if(!$valid && !isADMIN && USERUID != $chapterauthor && !in_array($chapterauthor, $storyinfo['coauthors'])) {
350 354
 		$warning = accessDenied( );