Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Jan 2, 2014
1 parent 0021f95 commit b40d64e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ XP Framework Core ChangeLog
- Extracted `remote` into https://github.com/xp-framework/remote
(@kiesel, @thekid)

### Bugfixes

* Fixed xp-framework/xp-framework#347 - "Undefined variable: len" in BSDSocket
(@haimich)

### Features

* Added util.ConfigurationException and util.ApplicationException as requested
Expand Down
3 changes: 2 additions & 1 deletion src/main/php/peer/BSDSocket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,8 @@ public function readBinary($maxLen= 4096) {
* @throws peer.SocketException
*/
public function write($str) {
$bytesWritten= socket_write($this->_sock, $str, strlen($str));
$len= strlen($str);
$bytesWritten= socket_write($this->_sock, $str, $len);
if (false === $bytesWritten || null === $bytesWritten) {
$e= new SocketException('Write of '.$len.' bytes to socket failed: '.$this->getLastError());
\xp::gc(__FILE__);
Expand Down

0 comments on commit b40d64e

Please sign in to comment.