From 04c57350d9d769d76fb50f4fdbfc3b9809dbd1df Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 7 Nov 2014 23:51:42 +0100 Subject: [PATCH] Fix PHP error "Only variables should be passed by reference" --- code/web/public_php/tools/nel_message.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/web/public_php/tools/nel_message.php b/code/web/public_php/tools/nel_message.php index c970b9f2c..ee3177f8d 100644 --- a/code/web/public_php/tools/nel_message.php +++ b/code/web/public_php/tools/nel_message.php @@ -86,9 +86,10 @@ } else { - $this->serialUInt32(strlen($val)); + $valLen = strlen($val); + $this->serialUInt32($valLen); $this->Buffer .= $val; - $this->Pos += strlen($val); + $this->Pos += $valLen; debug(sprintf ("write string '%s' %d
\n", $val, $this->Pos)); } }