markTestIncomplete( 'This test fails and should be fixed.' ); try { require_once 'PelJpeg.php'; $jpeg = new PelJpeg($tmpfile); // the error occurs here $exif = $jpeg->getExif(); if ($exif !== null) { $jpeg1 = new PelJpeg($bigfile); $jpeg1->setExif($exif); file_put_contents($bigfile, $jpeg1->getBytes()); } } catch (Exception $e) { $this->fail('Test should not throw exception: ' . $e->getMessage()); } } }