From d45bb9670e97a6d0cc87b87e182c3ab5635a60bd Mon Sep 17 00:00:00 2001 From: Jeramy Wenserit Date: Wed, 4 Mar 2015 17:39:39 +0100 Subject: [PATCH 1/3] fixed small issue with _SESSION argument not be existing --- TwitterStrategy.php | 12 +++++++++--- composer.json | 8 ++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/TwitterStrategy.php b/TwitterStrategy.php index 30efa78..d89ddc7 100644 --- a/TwitterStrategy.php +++ b/TwitterStrategy.php @@ -92,10 +92,16 @@ public function oauth_callback() { if (!session_id()) { session_start(); } - $session = $_SESSION['_opauth_twitter']; - unset($_SESSION['_opauth_twitter']); + + $session = null; + if (array_key_exists('_opauth_twitter', $_SESSION)) { + $session = $_SESSION['_opauth_twitter']; + unset($_SESSION['_opauth_twitter']); + } - if (!empty($_REQUEST['oauth_token']) && $_REQUEST['oauth_token'] == $session['oauth_token']) { + if (is_array($session) && + !empty($_REQUEST['oauth_token']) && + $_REQUEST['oauth_token'] == $session['oauth_token']) { $this->tmhOAuth->config['user_token'] = $session['oauth_token']; $this->tmhOAuth->config['user_secret'] = $session['oauth_token_secret']; diff --git a/composer.json b/composer.json index dc01359..b0d9652 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { - "name": "opauth/twitter", + "name": "xylesoft/twitter", "description": "Twitter strategy for Opauth", - "keywords": ["authentication","auth","twitter"], + "keywords": ["authentication","auth","twitter","forked"], "homepage": "http://opauth.org", "license": "MIT", "authors": [ @@ -9,6 +9,10 @@ "name": "U-Zyn Chua", "email": "chua@uzyn.com", "homepage": "http://uzyn.com" + }, + { + "name": "Jeramy Wenserit", + "email": "jeramy@xylesoft.co.uk", } ], "require": { From 3022650b0b8ac8fd008b80905cd4d4804a2ce32e Mon Sep 17 00:00:00 2001 From: Jeramy Wenserit Date: Wed, 4 Mar 2015 17:40:28 +0100 Subject: [PATCH 2/3] typo --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b0d9652..feabada 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ }, { "name": "Jeramy Wenserit", - "email": "jeramy@xylesoft.co.uk", + "email": "jeramy@xylesoft.co.uk" } ], "require": { From 81a1305efc494a0760b1f06a1ccc4195cbde7c75 Mon Sep 17 00:00:00 2001 From: Jeramy Wenserit Date: Wed, 4 Mar 2015 17:49:05 +0100 Subject: [PATCH 3/3] reverted composer file for a test --- composer.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index feabada..dc01359 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { - "name": "xylesoft/twitter", + "name": "opauth/twitter", "description": "Twitter strategy for Opauth", - "keywords": ["authentication","auth","twitter","forked"], + "keywords": ["authentication","auth","twitter"], "homepage": "http://opauth.org", "license": "MIT", "authors": [ @@ -9,10 +9,6 @@ "name": "U-Zyn Chua", "email": "chua@uzyn.com", "homepage": "http://uzyn.com" - }, - { - "name": "Jeramy Wenserit", - "email": "jeramy@xylesoft.co.uk" } ], "require": {