Skip to content

Commit 0722728

Browse files
committed
pkp#8845 Improved visibility of variables
1 parent 125365e commit 0722728

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

classes/config/ConfigParser.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ public function updateConfig($file, $params)
138138
$lines = file($file);
139139

140140
// Parse each line of the configuration file
141+
$currentSection = null;
141142
for ($i = 0, $count = count($lines); $i < $count; $i++) {
142143
$line = $lines[$i];
143144

classes/filter/Filter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ public function supportsAsInput(&$input)
414414
public function isCompatibleWithRuntimeEnvironment()
415415
{
416416
if ($this->_runtimeEnvironment === false) {
417+
$phpVersionMin = $phpVersionMax = $phpExtensions = $externalPrograms = null;
417418
// The runtime environment has never been
418419
// queried before.
419420
$runtimeSettings = $this->supportedRuntimeEnvironmentSettings();

classes/search/SubmissionSearch.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ public function retrieveResults($request, $context, $keywords, &$error, $publish
264264

265265
// Check whether a search plug-in jumps in to provide ranked search results.
266266
$totalResults = null;
267+
$results = null;
267268
$hookResult = Hook::call(
268269
'SubmissionSearch::retrieveResults',
269270
[&$context, &$keywords, $publishedFrom, $publishedTo, $orderBy, $orderDir, $exclude, $page, $itemsPerPage, &$totalResults, &$error, &$results]

classes/template/PKPTemplateManager.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,6 +1759,7 @@ public function smartyUrl($parameters, $smarty)
17591759
// Extract the reserved variables named in $paramList, and remove them
17601760
// from the parameters array. Variables remaining in parameters will be passed
17611761
// along to Request::url as extra parameters.
1762+
$params = $router = $page = $component = $anchor = $escape = $op = $path = null;
17621763
$paramList = ['params', 'router', 'context', 'page', 'component', 'op', 'path', 'anchor', 'escape'];
17631764
foreach ($paramList as $parameter) {
17641765
if (isset($parameters[$parameter])) {

classes/xml/PKPXMLParser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function __construct() {
4444

4545
function parseText($text) {
4646
$parser = $this->createParser();
47-
47+
$handler = null;
4848
if (!isset($this->handler)) {
4949
// Use default handler for parsing
5050
$handler = new XMLParserDOMHandler();
@@ -75,7 +75,7 @@ function parseText($text) {
7575
*/
7676
function parse($file) {
7777
$parser = $this->createParser();
78-
78+
$handler = null;
7979
if (!isset($this->handler)) {
8080
// Use default handler for parsing
8181
$handler = new XMLParserDOMHandler();

0 commit comments

Comments
 (0)