Skip to content

Commit

Permalink
Make work with PHP 8.1 (strftime deprecation)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Bion authored and f3l1x committed Dec 13, 2021
1 parent e110d63 commit a8e925f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ php:
- 7.3
- 7.4
- 8.0
- 8.1

before_install:
# turn off XDebug
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "econea/nusoap",
"type": "library",
"description": "Fixed NuSOAP for PHP 5.4 - 8.0",
"description": "Fixed NuSOAP for PHP 5.4 - 8.1",
"keywords": ["soap","nusoap","php","http","xml","transport","client"],
"license": "LGPL-2.0-only",
"homepage": "https://github.com/pwnlabs/nusoap",
Expand Down
6 changes: 4 additions & 2 deletions src/nusoap.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
$Id: nusoap.php,v 1.123 2010/04/26 20:15:08 snichol Exp $
$Id: nusoap.php,v 1.124 2010/04/26 20:15:08 snichol Exp $
NuSOAP - Web Services Toolkit for PHP
Expand Down Expand Up @@ -895,7 +895,9 @@ function getmicrotime()
$sec = time();
$usec = 0;
}
return strftime('%Y-%m-%d %H:%M:%S', $sec) . '.' . sprintf('%06d', $usec);
$dtx = new DateTime("@$sec");
return
date_format($dtx, 'Y-m-d H:i:s') . '.' . sprintf('%06d', $usec);
}

/**
Expand Down

0 comments on commit a8e925f

Please sign in to comment.