#1620: cli usage of dump-data broken by recent commit, patch included
-----------------------------------+----------------------------------------
Reporter: dominicclifton | Owner: jwage
Type: defect | Status: new
Priority: blocker | Milestone: Unknown
Component: Cli | Version: 1.0.3
Keywords: | Has_test: 0
Mystatus: Pending Core Response | Has_patch: 1
-----------------------------------+----------------------------------------
Every time I run doctrine dump-data it fails with the message
"Unable to find data fixtures path."
See here:
http://trac.doctrine-
project.org/browser/branches/1.0/lib/Doctrine/Task/DumpData.php?rev=5062#L53
When running doctrine cli from the sandbox the $path argument always seems
to be a string and thus the expression result is always false and the data
export is never done.
This is the changeset that broke it:
http://trac.doctrine-project.org/changeset/5062
Here's my proposed fix:
{{{
Index: opt/doctrine/lib/Doctrine/Task/DumpData.php
===================================================================
--- opt/doctrine/lib/Doctrine/Task/DumpData.php (revision 5139)
+++ opt/doctrine/lib/Doctrine/Task/DumpData.php (working copy)
@@ -45,7 +45,9 @@
if (is_array($path) && count($path) > 0) {
$path = $path[0];
-
+ }
+
+ if (!empty($path)) {
Doctrine::dumpData($path);
$this->notify(sprintf('Dumped data successfully to: %s',
$path));
}}}
This fix works for me.
This applies to 1.0 and 1.1 as can be seen in the changeset above.
--
Ticket URL: <http://trac.doctrine-project.org/ticket/1620>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"doctrine-svn" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---