Fix ProtectBinary

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
Kamil Tekiela 2026-02-19 21:57:22 +00:00
parent 3c3fb32237
commit 50d6d626f2
4 changed files with 12 additions and 21 deletions

View File

@ -15498,12 +15498,6 @@ parameters:
count: 4
path: tests/unit/Display/ResultsTest.php
-
message: '#^Property PhpMyAdmin\\Config\:\:\$settings \(array\{PmaAbsoluteUri\: string, AuthLog\: string, AuthLogSuccess\: bool, PmaNoRelation_DisableWarning\: bool, SuhosinDisableWarning\: bool, LoginCookieValidityDisableWarning\: bool, ReservedWordDisableWarning\: bool, TranslationWarningThreshold\: int, \.\.\.\}\) does not accept array\{PmaAbsoluteUri\: string, AuthLog\: string, AuthLogSuccess\: bool, PmaNoRelation_DisableWarning\: bool, SuhosinDisableWarning\: bool, LoginCookieValidityDisableWarning\: bool, ReservedWordDisableWarning\: bool, TranslationWarningThreshold\: int, \.\.\.\}\.$#'
identifier: assign.propertyType
count: 1
path: tests/unit/Display/ResultsTest.php
-
message: '''
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:

View File

@ -9925,9 +9925,6 @@
<code><![CDATA[testSetConfigParamsForDisplayTable]]></code>
<code><![CDATA[testSetConfigParamsForDisplayTable]]></code>
</PossiblyInvalidArgument>
<PropertyTypeCoercion>
<code><![CDATA[$config->settings]]></code>
</PropertyTypeCoercion>
</file>
<file src="tests/unit/EncodingTest.php">
<DeprecatedMethod>

View File

@ -2681,7 +2681,7 @@ class Results
// or transformation plugin is of non text type
// such as image
$isTypeBlob = $meta->isType(FieldMetadata::TYPE_BLOB);
$cfgProtectBinary = $this->config->settings['ProtectBinary'];
$cfgProtectBinary = $this->config->config->ProtectBinary;
if (
($meta->isBinary()
&& (

View File

@ -455,7 +455,7 @@ class ResultsTest extends AbstractTestCase
/**
* @return array<array{
* string,
* 'blob'|'noblob'|'all',
* string|null,
* string,
* object,
@ -587,15 +587,15 @@ class ResultsTest extends AbstractTestCase
}
/**
* @param string $protectBinary all|blob|noblob|no
* @param string|null $column the relevant column in data row
* @param string $class the html class for column
* @param object $meta the meta-information about the field
* @param mixed[] $map the list of relations
* @param mixed[] $urlParams the parameters for generate url
* @param bool $conditionField the column should highlighted or not
* @param string[] $transformOptions the transformation parameters
* @param string $output the output of this function
* @param 'blob'|'noblob'|'all' $protectBinary all|blob|noblob|no
* @param string|null $column the relevant column in data row
* @param string $class the html class for column
* @param object $meta the meta-information about the field
* @param mixed[] $map the list of relations
* @param mixed[] $urlParams the parameters for generate url
* @param bool $conditionField the column should highlighted or not
* @param string[] $transformOptions the transformation parameters
* @param string $output the output of this function
*/
#[DataProvider('dataProviderForTestGetDataCellForNonNumericColumns')]
public function testGetDataCellForNonNumericColumns(
@ -614,7 +614,7 @@ class ResultsTest extends AbstractTestCase
$_SESSION['tmpval']['display_blob'] = false;
$_SESSION['tmpval']['relational_display'] = false;
$config = Config::getInstance();
$config->settings['ProtectBinary'] = $protectBinary;
$config->set('ProtectBinary', $protectBinary);
$statementInfo = new StatementInfo(new Parser(), null, new StatementFlags(), [], []);
self::assertStringContainsString(
$output,