Skip to content

Commit d468bc2

Browse files
committed
Merge branch 'main' into next
2 parents 6fce49b + f12eb44 commit d468bc2

File tree

7 files changed

+45
-47
lines changed

7 files changed

+45
-47
lines changed

app/code/core/Mage/Catalog/Helper/Product/Flat.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,20 @@ public function isAddChildData()
164164
return (int) Mage::getConfig()->getNode(self::XML_NODE_ADD_CHILD_DATA);
165165
}
166166

167+
/**
168+
* Enable Catalog Product Flat
169+
*
170+
* @param bool $save
171+
*/
172+
public function enableFlatCollection($save = false)
173+
{
174+
if ($save) {
175+
$this->_forceFlatStatusOld = $this->_forceFlatStatus;
176+
}
177+
178+
$this->_forceFlatStatus = false;
179+
}
180+
167181
/**
168182
* Disable Catalog Product Flat
169183
*

app/code/core/Mage/Core/Model/Design/Package.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Mage_Core_Model_Design_Package
5656
/**
5757
* Package theme
5858
*
59-
* @var string
59+
* @var array
6060
*/
6161
protected $_theme;
6262

@@ -242,7 +242,7 @@ public function setTheme()
242242
{
243243
switch (func_num_args()) {
244244
case 1:
245-
foreach (['layout', 'template', 'skin', 'locale'] as $type) {
245+
foreach (['layout', 'template', 'skin', 'locale', 'default'] as $type) {
246246
$this->_theme[$type] = func_get_arg(0);
247247
}
248248
break;

composer.lock

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Mage/HTTP/Client/Curl.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,11 @@ public function getCookies()
264264
if (!$c) {
265265
continue;
266266
}
267-
list($key, $val) = explode("=", $values[0]);
268-
if (is_null($val)) {
267+
list($key, $val) = array_pad(array_map('trim', explode('=', $values[0])), 2, null);
268+
if (is_null($val) || !strlen($key)) {
269269
continue;
270270
}
271-
$out[trim($key)] = trim($val);
271+
$out[$key] = $val;
272272
}
273273
return $out;
274274
}
@@ -290,11 +290,11 @@ public function getCookiesFull()
290290
if (!$c) {
291291
continue;
292292
}
293-
list($key, $val) = explode("=", $values[0]);
294-
if (is_null($val)) {
293+
list($key, $val) = array_pad(array_map('trim', explode('=', $values[0])), 2, null);
294+
if (is_null($val) || !strlen($key)) {
295295
continue;
296296
}
297-
$out[trim($key)] = ['value' => trim($val)];
297+
$out[$key] = ['value' => $val];
298298
array_shift($values);
299299
$c--;
300300
if (!$c) {

lib/Mage/HTTP/Client/Socket.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,11 @@ public function getCookies()
303303
if (!$c) {
304304
continue;
305305
}
306-
list($key, $val) = explode("=", $values[0]);
307-
if (is_null($val)) {
306+
list($key, $val) = array_pad(array_map('trim', explode('=', $values[0])), 2, null);
307+
if (is_null($val) || !strlen($key)) {
308308
continue;
309309
}
310-
$out[trim($key)] = trim($val);
310+
$out[$key] = $val;
311311
}
312312
return $out;
313313
}
@@ -329,11 +329,11 @@ public function getCookiesFull()
329329
if (!$c) {
330330
continue;
331331
}
332-
list($key, $val) = explode("=", $values[0]);
333-
if (is_null($val)) {
332+
list($key, $val) = array_pad(array_map('trim', explode('=', $values[0])), 2, null);
333+
if (is_null($val) || !strlen($key)) {
334334
continue;
335335
}
336-
$out[trim($key)] = ['value' => trim($val)];
336+
$out[$key] = ['value' => $val];
337337
array_shift($values);
338338
$c--;
339339
if (!$c) {

phpstan.dist.baseline.neon

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2125,16 +2125,6 @@ parameters:
21252125
count: 1
21262126
path: app/code/core/Mage/Core/Model/Design/Package.php
21272127

2128-
-
2129-
message: "#^Cannot assign offset 'layout'\\|'locale'\\|'skin'\\|'template' to string\\.$#"
2130-
count: 1
2131-
path: app/code/core/Mage/Core/Model/Design/Package.php
2132-
2133-
-
2134-
message: "#^Cannot assign offset string to string\\.$#"
2135-
count: 1
2136-
path: app/code/core/Mage/Core/Model/Design/Package.php
2137-
21382128
-
21392129
message: "#^Property Mage_Core_Model_Design_Package\\:\\:\\$_store \\(int\\|Mage_Core_Model_Store\\|string\\) on left side of \\?\\? is not nullable\\.$#"
21402130
count: 1

phpstan.dist.issues.neon

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,3 @@ parameters:
55
-
66
message: "#Call to function is_null\\(\\) with bool will always evaluate to false.$#"
77
path: app/code/core/Mage/Newsletter/Model/Subscriber.php
8-
-
9-
message: "#Call to function is_null\\(\\) with string will always evaluate to false.$#"
10-
path: lib/Mage/HTTP/Client/Curl.php
11-
-
12-
message: "#Call to function is_null\\(\\) with string will always evaluate to false.$#"
13-
path: lib/Mage/HTTP/Client/Socket.php

0 commit comments

Comments
 (0)