Skip to content

Commit

Permalink
Add additional checks for nullable fields (#17)
Browse files Browse the repository at this point in the history
* Add additional checks for nullable fields
  • Loading branch information
onurpolattimur authored Dec 26, 2022
1 parent 280528f commit e28344f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions craftgate-payment-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: Accept debit/credit card payments easily and directly on your WordPress site using Craftgate.
* Author: Craftgate
* Author URI: https://craftgate.io/
* Version: 1.0.7
* Version: 1.0.8
* Requires at least: 4.4
* Tested up to: 6.0
* WC requires at least: 3.0.0
Expand Down Expand Up @@ -380,7 +380,7 @@ private function retrieve_card_user_key($customer_id, $api_key)
);

$result = $wpdb->get_col($query);
if ($result[0]) {
if (isset($result[0])) {
return $result[0];
} else {
return null;
Expand Down
2 changes: 1 addition & 1 deletion includes/lib/craftgate/src/Adapter/BaseAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private function prepareHeaders($path, $request = null)
'content-type: application/json'
);

if ($GLOBALS["cg-lang-header"]) {
if (isset($GLOBALS["cg-lang-header"])) {
$headers[] = 'lang: ' . $GLOBALS["cg-lang-header"];
}

Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: craftgate, payment gateway, kredi kartı, banka kartı, ödeme, sanal pos,
Requires at least: 4.4
Tested up to: 6.0
Requires PHP: 5.6
Stable tag: 1.0.7
Stable tag: 1.0.8
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -63,6 +63,9 @@ Craftgate kullanarak ödeme geçirebilmek için üyeliğinizin olması gerekmekt
6. Sipariş Yönetim Sayfası

== Changelog ==
= 1.0.8 - 2026-12-26 =
* Add additional checks for nullable fields

= 1.0.7 - 2022-11-09 =
* updates wordpress and woocommerce versions

Expand Down

0 comments on commit e28344f

Please sign in to comment.