Skip to content

Commit 5709c02

Browse files
committed
Merge branch 'examples_interface_fix' into 'main'
YP-2314 deprecation fix See merge request ypmn-public/php-api-client!40
2 parents f2b8043 + 535d1a1 commit 5709c02

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Std.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ public static function json_fix_cyr($json_str) {
326326
* @param string|null $currency
327327
* @return string|null
328328
*/
329-
public static function data_img_tag(string $data_img, $sum, string $method = null, ?string $currency = null) : ?string
329+
public static function data_img_tag(string $data_img, $sum, ?string $method = null, ?string $currency = null) : ?string
330330
{
331331
if (empty($data_img)) {
332332
return null;
@@ -357,6 +357,8 @@ class="ypmn-qr-code w-100"
357357

358358
/** @return string IP */
359359
public static function get_client_ip() : string {
360+
$ip = '127.0.0.1';
361+
360362
if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
361363
$ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
362364
} elseif (!empty($_SERVER['HTTP_CLIENT_IP'])) {

0 commit comments

Comments
 (0)