Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.8.2
-
Fix Version/s: 1.9.0
-
Component/s: Zend_Rest_Server
-
Labels:None
Description
since
null == null and null == false and null == 0
but
null === null and null !== false and null !== 0
the Zend_Rest_Server::returnResponse() function should be changed form
Zend/Rest/Server.php
public function returnResponse($flag = null) { if (null == $flag) { //<-- 2 equal signs return $this->_returnResponse; } $this->_returnResponse = ($flag) ? true : false; return $this; }
to
Zend/Rest/Server.php
public function returnResponse($flag = null) { if (null === $flag) { //<-- 3 equal signs or use is_null() return $this->_returnResponse; } $this->_returnResponse = ($flag) ? true : false; return $this; }
The way it is now, if you try to set it to false, it thinks it's null and returns $this->_returnResponse instead of setting it.
Solved in SVN r16347