From eb2f9c98ac115ce67e9a740b200c832153ffa05c Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 23 Dec 2008 14:21:29 -0500 Subject: replace NULL with null Another global search-and-replace update. Here, I've replaced the PHP keyword 'NULL' with its lowercase version. This is another PEAR code standards change. darcs-hash:20081223192129-84dde-4a0182e0ec16a01ad88745ad3e08f7cb501aee0b.gz --- scripts/xmppdaemon.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'scripts/xmppdaemon.php') diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php index cd27a2c14..ead842928 100755 --- a/scripts/xmppdaemon.php +++ b/scripts/xmppdaemon.php @@ -39,7 +39,7 @@ set_error_handler('common_error_handler'); class XMPPDaemon extends Daemon { - function XMPPDaemon($resource=NULL) { + function XMPPDaemon($resource=null) { static $attrs = array('server', 'port', 'user', 'password', 'host'); foreach ($attrs as $attr) @@ -71,7 +71,7 @@ class XMPPDaemon extends Daemon { $this->conn->setReconnectTimeout(600); jabber_send_presence("Send me a message to post a notice", 'available', - NULL, 'available', 100); + null, 'available', 100); return !$this->conn->isDisconnected(); } @@ -92,7 +92,7 @@ class XMPPDaemon extends Daemon { function handle_reconnect(&$pl) { $this->conn->processUntil('session_start'); - $this->conn->presence('Send me a message to post a notice', 'available', NULL, 'available', 100); + $this->conn->presence('Send me a message to post a notice', 'available', null, 'available', 100); } function get_user($from) { @@ -165,30 +165,30 @@ class XMPPDaemon extends Daemon { $addresses = $xml->sub('addresses'); if (!$addresses) { $this->log(LOG_WARNING, 'Forwarded message without addresses'); - return NULL; + return null; } $address = $addresses->sub('address'); if (!$address) { $this->log(LOG_WARNING, 'Forwarded message without address'); - return NULL; + return null; } if (!array_key_exists('type', $address->attrs)) { $this->log(LOG_WARNING, 'No type for forwarded message'); - return NULL; + return null; } $type = $address->attrs['type']; if ($type != 'ofrom') { $this->log(LOG_WARNING, 'Type of forwarded message is not ofrom'); - return NULL; + return null; } if (!array_key_exists('jid', $address->attrs)) { $this->log(LOG_WARNING, 'No jid for forwarded message'); - return NULL; + return null; } $jid = $address->attrs['jid']; if (!$jid) { $this->log(LOG_WARNING, 'Could not get jid from address'); - return NULL; + return null; } $this->log(LOG_DEBUG, 'Got message forwarded from jid ' . $jid); return $jid; -- cgit v1.2.3-54-g00ecf