From 44344fd056de06ea7079726f6bdbbf9214935db5 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 26 Oct 2005 20:37:10 +0000 Subject: [PATCH] Tomg, please test with error_reporting set to E_ALL or we will beat you up! * Set default value for $this->scrolltop * Use proper function to get an integer or empty value, instead of bizarre HTML-escape-random-junk-on-input --- includes/EditPage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index f8730411ab..87aa4d7ed9 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -29,7 +29,7 @@ class EditPage { var $minoredit = false, $watchthis = false, $recreate = false; var $textbox1 = '', $textbox2 = '', $summary = ''; var $edittime = '', $section = '', $starttime = ''; - var $oldid = 0, $editintro = ''; + var $oldid = 0, $editintro = '', $scrolltop = null; /** * @todo document @@ -319,7 +319,7 @@ class EditPage { $this->edittime = $request->getVal( 'wpEdittime' ); $this->starttime = $request->getVal( 'wpStarttime' ); - $this->scrolltop = htmlentities( $request->getVal( 'wpScrolltop' ) ); + $this->scrolltop = $request->getIntOrNull( 'wpScrolltop' ); if( is_null( $this->edittime ) ) { # If the form is incomplete, force to preview. -- 2.20.1