Skip to content

Commit

Permalink
Fix #18278
Browse files Browse the repository at this point in the history
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
  • Loading branch information
kamil-tekiela committed Mar 19, 2023
1 parent 74c48a4 commit 4e22944
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion libraries/classes/Display/Results.php
Expand Up @@ -802,7 +802,7 @@ private function getTableHeadersForColumns(
$sqlMd5 = md5($this->properties['server'] . $this->properties['db'] . $this->properties['sql_query']);
$sessionMaxRows = $isLimitedDisplay
? 0
: $_SESSION['tmpval']['query'][$sqlMd5]['max_rows'];
: (int) $_SESSION['tmpval']['query'][$sqlMd5]['max_rows'];

Check warning on line 805 in libraries/classes/Display/Results.php

View workflow job for this annotation

GitHub Actions / Infection (8.1, ubuntu-latest)

Escaped Mutant for Mutator "CastInt": --- Original +++ New @@ @@ // required to generate sort links that will remember whether the // "Show all" button has been clicked $sqlMd5 = md5($this->properties['server'] . $this->properties['db'] . $this->properties['sql_query']); - $sessionMaxRows = $isLimitedDisplay ? 0 : (int) $_SESSION['tmpval']['query'][$sqlMd5]['max_rows']; + $sessionMaxRows = $isLimitedDisplay ? 0 : $_SESSION['tmpval']['query'][$sqlMd5]['max_rows']; // Following variable are needed for use in isset/empty or // use with array indexes/safe use in the for loop $highlightColumns = $this->properties['highlight_columns'];

// Following variable are needed for use in isset/empty or
// use with array indexes/safe use in the for loop
Expand Down
2 changes: 0 additions & 2 deletions psalm-baseline.xml
Expand Up @@ -6370,7 +6370,6 @@
<code><![CDATA[$rel['foreign_table']]]></code>
<code>$row[$i]</code>
<code>$row[$i]</code>
<code>$sessionMaxRows</code>
<code>$sortDirection[$index]</code>
<code>$sortDirection[$index]</code>
<code>$sortDirection[$index]</code>
Expand Down Expand Up @@ -6574,7 +6573,6 @@
<code>$rel</code>
<code>$relationalDisplay</code>
<code><![CDATA[$rowInfo[mb_strtolower($fieldsMeta[$m]->orgname)]]]></code>
<code>$sessionMaxRows</code>
<code>$sortDirection[$specialIndex]</code>
<code>$sqlQuery</code>
<code>$sqlQueryAdd</code>
Expand Down

0 comments on commit 4e22944

Please sign in to comment.