Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed null parameter warning in DataFlow Profiles #3827

Merged
merged 12 commits into from
Feb 27, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ public function getValue($key, $default = '', $defaultNew = null)
}

$value = $this->getData($key);
if ($value === null) {
return $default;
}
return $this->escapeHtml(strlen($value) > 0 ? $value : $default);
}

Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Dataflow/Model/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected function _beforeSave()
{
parent::_beforeSave();
$actionsXML = $this->getData('actions_xml');
if (strlen($actionsXML) < 0 &&
if ((string) strlen($actionsXML) < 0 &&
ADDISON74 marked this conversation as resolved.
Show resolved Hide resolved
@simplexml_load_string('<data>' . $actionsXML . '</data>', null, LIBXML_NOERROR) === false
) {
Mage::throwException(Mage::helper('dataflow')->__("Actions XML is not valid."));
Expand Down
10 changes: 0 additions & 10 deletions phpstan.dist.baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2940,16 +2940,6 @@ parameters:
count: 1
path: app/code/core/Mage/Dataflow/Model/Convert/Profile/Abstract.php

-
message: "#^Comparison operation \"\\<\" between int\\<0, max\\> and 0 is always false\\.$#"
count: 1
path: app/code/core/Mage/Dataflow/Model/Profile.php

-
message: "#^Result of && is always false\\.$#"
count: 1
path: app/code/core/Mage/Dataflow/Model/Profile.php

-
message: "#^Right side of && is always true\\.$#"
count: 1
Expand Down
Loading