Browse Source

Revert "cosmetic tweak"

This reverts commit e356c2a9025212d6d4af08d1fcd958ef785195d5.
Fabien Potencier 14 years ago
parent
commit
11d8ce3976

+ 1 - 1
src/Symfony/Bundle/DoctrineMigrationsBundle/Command/MigrationsGenerateFromDataFixturesCommand.php

@@ -95,7 +95,7 @@ class MigrationsGenerateFromDataFixturesCommand extends GenerateCommand
                 if (is_object($param)) {
                     if ($param instanceOf \DateTime) {
                         $queries[$key][1][$key2] = $param->format('Y-m-d\TH:i:s\Z');
-                    } else if (method_exists($param, '__toString')) {
+                    } else if (in_array('__toString', get_class_methods($param))) {
                         $queries[$key][1][$key2] = (string)$param;
                     } else {
                         $output->writeln(sprintf('  <comment>></comment> <info>cannot convert object of type %s to a string</info>', get_class($param)));