Skip to content

Commit

Permalink
Update session to use the new sidexpired
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Goodchild committed Aug 25, 2017
1 parent 3c89570 commit 7abde37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ composer require gyron/net2web

Alternatively you can update the `"require": {` section in your `composer.json` with a line reading:
```
"gyron/net2web" : "master"
"gyron/net2web" : "v1.0.1"
```
(Note: We have not yet versioned this library and so simply installing directly from master is all that is available for the moment).

## Usage
### Quick Start
Expand Down
3 changes: 2 additions & 1 deletion src/Net2Web/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ public function __construct( string $sUsername, string $sPassword, string $sIp,
$this->sSessionId = $sSessionId;

$oXmlResult = $this->send( 'serverhostname' );//serverhostname, lasterrormessage
if ( !isset( $oXmlResult->item->value ) || strpos( (string)$oXmlResult->item->value, 'error' ) != false ) {

if ( isset( $oXmlResult->attributes()->method ) && $oXmlResult->attributes()->method == "sidexpired" ) {
// problems with the session, re-authenticate
$this->sSessionId = null;
}
Expand Down

0 comments on commit 7abde37

Please sign in to comment.