From ce31449b2d4b5af9f3462c4129414b4dc81daecc Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 29 Sep 2012 03:26:08 +0200 Subject: [PATCH] Fix calls to non existing method, fixes #1154 --- src/Composer/Package/Locker.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Composer/Package/Locker.php b/src/Composer/Package/Locker.php index dd553c8a5..f4532230b 100644 --- a/src/Composer/Package/Locker.php +++ b/src/Composer/Package/Locker.php @@ -165,7 +165,9 @@ class Locker } if (!empty($info['source-reference'])) { $package->setSourceReference($info['source-reference']); - $package->setDistReference($info['source-reference']); + if (is_callable($package, 'setDistReference')) { + $package->setDistReference($info['source-reference']); + } } $packages->addPackage($package);