-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6239758
commit 0b7af93
Showing
3 changed files
with
8 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -945,11 +945,11 @@ public function create_shipment_label( $data ) { | |
$data['to']['email'] = $this->__get('billing_email'); | ||
} | ||
|
||
if ( ! isset($data['from']['id']) ) { | ||
if (! isset($data['from']['id']) || '' === $data['from']['id']) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
andrecedik
Author
Contributor
|
||
unset( $data['from']['id'] ); | ||
} | ||
|
||
if ( ! isset($data['to']['id']) ) { | ||
if ( ! isset($data['to']['id']) || '' === $data['to']['id'] ) { | ||
unset( $data['to']['id'] ); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vor 4 Monaten: if ( '' === $data['from']['id']) // sinngemäß
Vor 2 Wochen: if (! isset($data['from']['id']) // Wahrscheinlich, wegen Notices - aber das ist etwas ganz anderes als das obige
Jetzt:
if (! isset($data['from']['id']) || '' === $data['from']['id']) // Bringt die notice wieder, denn Wenn es nicht existiert, dann wird dessen Wert geprüft, aber etwas nicht-existentes schmeißt die bekannten notices.
Ich glaube du meintest:
if ( isset($data['from'], $data['from']['id']) && ! $data['from']['id'])
from gibt es, from.id gibt es (schützt vor notices), UND from.id ist 0, leerer string oder false.
Ja dann unset bitte
@andrecedik