Bug #78575 [NEW]: copy() always report an error with a custom stream wrapper

From: Date: Fri, 20 Sep 2019 13:02:47 +0000
Subject: Bug #78575 [NEW]: copy() always report an error with a custom stream wrapper
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222848@lists.php.net to get a copy of this message
From: thomas dot gerbet at enalean dot com Operating system: PHP version: 7.4.0RC2 Package: Streams related Bug Type: Bug Bug description:copy() always report an error with a custom stream wrapper Description: ------------ Issue found while using the vfsStream library [0]. copy() always return false even if the data are actually copied. This behaviour change seems to be present since https://github.com/php/php-src/commit/11f3e24190fa45689c8ccaeea54a28db6752092e [0] https://github.com/bovigo/vfsStream Test script: --------------- <?php // See https://github.com/LeSuisse/php74-rc2-streamwrapper-bug require_once __DIR__ . '/vendor/autoload.php'; $fs = org\bovigo\vfs\vfsStream::setup(); $source_path = $fs->url() . '/f1'; file_put_contents($source_path, 'A'); $destination_path = $fs->url() . '/f2'; var_dump(copy($source_path, $destination_path)); var_dump(file_get_contents($destination_path)); Expected result: ---------------- bool(true) string(1) "A" Actual result: -------------- bool(false) string(1) "A" -- Edit bug report at https://bugs.php.net/bug.php?id=78575&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78575&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78575&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78575&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78575&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78575&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78575&r=support Expected behavior: https://bugs.php.net/fix.php?id=78575&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78575&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78575&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78575&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78575&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78575&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78575&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78575&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78575&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78575&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78575&r=mysqlcfg

« previous php.bugs (#222848) next »