Skip to content

Commit 41bf7d4

Browse files
committed
Strict types Fix #26
1 parent 8736017 commit 41bf7d4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Examples/UpdateInvoice.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
$invoiceId = 1;
2121

22-
$inv = new FakturaVydana($invoiceId);
22+
$inv = new FakturaVydana($invoiceId, ['autoload' => false]);
2323
$inv->takeData(["stavMailK" => "stavMail.odeslano"]);
2424
$inv->sync();
2525

src/AbraFlexi/RO.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ public function processInit($init) {
625625
$this->loadFromAbraFlexi($init);
626626
} elseif (is_array($init)) {
627627
$this->takeData($init);
628-
} elseif (!is_object($init) && preg_match('/\.(json|xml|csv)/', $init)) {
628+
} elseif (!is_object($init) && preg_match('/\.(json|xml|csv)/', strval($init))) {
629629
$this->takeData($this->getFlexiData((($init[0] != '/') ? $this->evidenceUrlWithSuffix($init) : $init)));
630630
} else {
631631
if($this->autoload === false){
@@ -2112,8 +2112,8 @@ public function getExternalID($want = null) {
21122112
$extid = is_array($ids) ? current($ids) : $ids;
21132113
}
21142114
} else {
2115-
if (!is_null($ids) && is_array($ids)) {
2116-
foreach ($ids as $id) {
2115+
if (!is_null($ids) && is_array($ids->value)) {
2116+
foreach ($ids->value as $id) {
21172117
if (strstr($id, 'ext:' . $want)) {
21182118
if (is_null($extid)) {
21192119
$extid = str_replace('ext:' . $want . ':', '', $id);

0 commit comments

Comments
 (0)