]> source.dussan.org Git - nextcloud-server.git/commit
Fix reading blob data as resource 33344/head
authorThomas Citharel <tcit@tcit.fr>
Wed, 6 Jul 2022 07:53:59 +0000 (09:53 +0200)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Mon, 25 Jul 2022 16:03:19 +0000 (16:03 +0000)
commit1c0342af58a9b4040fe7e7976df9a532311e952d
tree72d2a3a6ca3126177eb132e75d5ddec2920808eb
parenta02e81831d9fc6b544c5446a3c8d346b2f0535bc
Fix reading blob data as resource

PostgreSQL returns data as resource when using IQueryBuilder::PARAM_LOB
(which is used for QBMapper).

Previously we just converted this resource using settype, which produced
things like "Resource id #14" instead of the actual resource data.

Now we read the stream correctly if the returned data is a resource

See context at #22472

Fixes #22439

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
lib/public/AppFramework/Db/Entity.php
tests/lib/AppFramework/Db/EntityTest.php