]> source.dussan.org Git - nextcloud-server.git/commit
Fix reading blob data as resource 33129/head
authorThomas Citharel <tcit@tcit.fr>
Wed, 6 Jul 2022 07:53:59 +0000 (09:53 +0200)
committerJoas Schilling <coding@schilljs.com>
Mon, 25 Jul 2022 07:45:47 +0000 (09:45 +0200)
commit1d30fb7852e61cf9a2fcd03e83fa193c6aa5c827
tree16fa15a59555ece94d1da53d160611fe28fbea8d
parent35a6f54bcd559016f4244ab0c38c2dd8a82c57cb
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