rdbms: Clean up MssqlBlob constructor
authorKunal Mehta <legoktm@member.fsf.org>
Sun, 24 Mar 2019 00:37:20 +0000 (17:37 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Fri, 5 Apr 2019 23:00:09 +0000 (16:00 -0700)
commit790ac80b847ad161249508c4ed99b84f686bc4d1
treefe1342fcdd98ac1192c84fcc5b869e98bbaded2c
parent4ef179e3359b79118285038fde2f78e425155fe1
rdbms: Clean up MssqlBlob constructor

Returning inside PHP constructors doesn't work, so whatever this code
was previously trying to do didn't work. Now we directly set $this->data
to the existing $data->data. Note that we can't fall through to the
instanceof Blob due to MssqlBlob->fetch() not being idempotent.

Also expand the @param documentation for $data.

h/t to phan for highlighting this and Anomie for explaining that the
behavior was wrong and how to properly fix it.

Change-Id: Ied5ba2f63cbaf7c8e0f951000dbc4aa3089edd80
includes/libs/rdbms/encasing/MssqlBlob.php