diff --git a/library/Zend/Mobile/Push/Message/Gcm.php b/library/Zend/Mobile/Push/Message/Gcm.php index d7be50e886..a15e70a380 100644 --- a/library/Zend/Mobile/Push/Message/Gcm.php +++ b/library/Zend/Mobile/Push/Message/Gcm.php @@ -267,6 +267,10 @@ public function toJson() if ($this->_ttl !== 2419200) { $json['time_to_live'] = $this->_ttl; } - return json_encode($json); + if (version_compare(PHP_VERSION, '5.4.0') >= 0) { + return json_encode($json, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); + } else { + return json_encode($json); + } } }