Commit ca3de1c3 authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-1199 Fixed variable name holding the length of the stream/string.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 2e8bd067
...@@ -136,11 +136,11 @@ class StringStreamWrapper { ...@@ -136,11 +136,11 @@ class StringStreamWrapper {
public function stream_truncate ($new_size) { public function stream_truncate ($new_size) {
// cut the string! // cut the string!
$this->stringstream = Utils::Utf8_truncate($this->stringstream, $new_size); $this->stringstream = Utils::Utf8_truncate($this->stringstream, $new_size);
$this->streamlength = strlen($this->stringstream); $this->stringlength = strlen($this->stringstream);
if ($this->position > $this->streamlength) { if ($this->position > $this->stringlength) {
ZLog::Write(LOGLEVEL_WARN, sprintf("StringStreamWrapper->stream_truncate(): stream position (%d) ahead of new size of %d. Repositioning pointer to end of stream.", $this->position, $this->streamlength)); ZLog::Write(LOGLEVEL_WARN, sprintf("StringStreamWrapper->stream_truncate(): stream position (%d) ahead of new size of %d. Repositioning pointer to end of stream.", $this->position, $this->stringlength));
$this->position = $this->streamlength; $this->position = $this->stringlength;
} }
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment