Skip to content

Commit

Permalink
Fix: strlen(): Passing null to parameter billbeeio#1 ($string) of typ…
Browse files Browse the repository at this point in the history
…e string is deprecated

Fix: PDATE stock: [errorMessage] => Parameter SKU is empty
  • Loading branch information
kruegge82 committed Mar 12, 2024
1 parent ad5c72d commit 4a969dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/CustomClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function createRequest(string $method, ?string $uri, array $options)
$options = $this->prepareDefaults($options);
// Remove request modifying parameter because it can be done up-front.
$headers = $options['headers'] ?? [];
$body = $options['body'] ?? null;
$body = $options['body'] ?? '';
$version = $options['version'] ?? '1.1';
// Merge the URI into the base URI.
$uri = $this->buildUri($uri, $options);
Expand Down
15 changes: 7 additions & 8 deletions src/Model/Stock.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ class Stock
* @Serializer\Type("string")
* @Serializer\SerializedName("Sku")
*
* @deprecated Use getter/setter instead. Will be private in the next major version.
*/
protected $sku;
public $sku;

/**
* @var ?int
Expand All @@ -34,7 +33,7 @@ class Stock
*
* @deprecated Use getter/setter instead. Will be private in the next major version.
*/
protected $stockId = null;
public $stockId = null;

/**
* @var ?string
Expand All @@ -44,7 +43,7 @@ class Stock
*
* @deprecated Use getter/setter instead. Will be private in the next major version.
*/
protected $reason;
public $reason;

/**
* @var ?float
Expand All @@ -54,7 +53,7 @@ class Stock
*
* @deprecated Use getter/setter instead. Will be private in the next major version.
*/
protected $oldQuantity = 0;
public $oldQuantity = 0;

/**
* @var ?float
Expand All @@ -64,7 +63,7 @@ class Stock
*
* @deprecated Use getter/setter instead. Will be private in the next major version.
*/
protected $newQuantity = 0;
public $newQuantity = 0;

/**
* @var float
Expand All @@ -74,7 +73,7 @@ class Stock
*
* @deprecated Use getter/setter instead. Will be private in the next major version.
*/
protected $deltaQuantity = 0;
public $deltaQuantity = 0;

/**
* @var bool
Expand All @@ -84,7 +83,7 @@ class Stock
*
* @deprecated Use getter/setter instead. Will be private in the next major version.
*/
protected $autosubtractReservedAmount = false;
public $autosubtractReservedAmount = false;

public static function fromProduct(Product $product): Stock
{
Expand Down

0 comments on commit 4a969dd

Please sign in to comment.