Minor OrderedStreamingForkController improvements
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 10 Oct 2018 19:17:37 +0000 (20:17 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Wed, 10 Oct 2018 21:37:02 +0000 (22:37 +0100)
commit5a7670e42693e312d14e702e26d07709cd291b3f
tree11a6aacc12ea5674f5fe90800f2df86011134825
parent20845db7dd25b2fee5b77171a925d6f9abccecbf
Minor OrderedStreamingForkController improvements

Follows-up c94dea7029cae.

* Avoid strlen() where a strict check suffices.
* Use substr() for both comparison and stripping, avoid
  potentially expensive, but also fragile, because strlen()-1
  can  produce $str[-1], which would
  > PHP Notice:  Uninitialized string offset: -1
  Luckily, the implied null would work as expected, given that
  `null !== "\n"` and produces the same result.

Change-Id: If61e5e412aaa2dc7c00c4441b3b7bd5f04160ec8
includes/OrderedStreamingForkController.php