diff options
author | Hans Duedal <hd@onlinecity.dk> | 2011-09-06 17:19:37 +0200 |
---|---|---|
committer | Hans Duedal <hd@onlinecity.dk> | 2011-09-06 17:19:37 +0200 |
commit | 8ef2d23b838d422ce34f93268d5e65a67cd2a635 (patch) | |
tree | a8cd979311274a94360418c3a68ba6bdeace5f87 | |
parent | 905ba80ab8f0e7410a5699c9c205da0ebc72b27c (diff) | |
download | php-smpp-8ef2d23b838d422ce34f93268d5e65a67cd2a635.zip php-smpp-8ef2d23b838d422ce34f93268d5e65a67cd2a635.tar.gz php-smpp-8ef2d23b838d422ce34f93268d5e65a67cd2a635.tar.bz2 |
Improved compatibility with PHP 5.2
-rw-r--r-- | smppclient.class.php | 4 | ||||
-rw-r--r-- | sockettransport.class.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/smppclient.class.php b/smppclient.class.php index 1b7fc11..f7bc954 100644 --- a/smppclient.class.php +++ b/smppclient.class.php @@ -83,7 +83,7 @@ class SmppClient $this->pdu_queue=array(); $this->transport = $transport; - $this->debugHandler = $debugHandler ?: 'error_log'; + $this->debugHandler = $debugHandler ? $debugHandler : 'error_log'; $this->mode = null; } @@ -1148,6 +1148,6 @@ class SmppTag */ public function getBinary() { - return pack('nn'.$this->type, $this->id, ($this->length ?: strlen($this->value)), $this->value); + return pack('nn'.$this->type, $this->id, ($this->length ? $this->length : strlen($this->value)), $this->value); } }
\ No newline at end of file diff --git a/sockettransport.class.php b/sockettransport.class.php index d6bce99..a2773de 100644 --- a/sockettransport.class.php +++ b/sockettransport.class.php @@ -37,7 +37,7 @@ class SocketTransport public function __construct(array $hosts,$ports,$persist=false,$debugHandler=null) { $this->debug = self::$defaultDebug; - $this->debugHandler = $debugHandler ?: 'error_log'; + $this->debugHandler = $debugHandler ? $debugHandler : 'error_log'; // Deal with optional port $h = array(); |