diff --git a/code/web/public_php/admin/nel/nel_message.php b/code/web/public_php/admin/nel/nel_message.php
index 5e704bff1..42dd91cbe 100644
--- a/code/web/public_php/admin/nel/nel_message.php
+++ b/code/web/public_php/admin/nel/nel_message.php
@@ -91,9 +91,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));
}
}
diff --git a/code/web/public_php/tools/nel_message.php b/code/web/public_php/tools/nel_message.php
index ee3177f8d..b696bb151 100644
--- a/code/web/public_php/tools/nel_message.php
+++ b/code/web/public_php/tools/nel_message.php
@@ -104,7 +104,8 @@
}
else
{
- $this->serialUInt32($val->toInt());
+ $intValue = $val->toInt();
+ $this->serialUInt32($intValue);
debug(sprintf ("write enum '%s' %d
\n", $val->toString(), $this->Pos));
}
}