Ticket #1413 (closed defect: fixed)

Opened 10 months ago

Last modified 10 months ago

echoln overwrite symfony's echoln if sfYaml.php call first

Reported by: rande Owned by: jwage
Priority: major Milestone: 1.0.3
Component: File Parser Version: 1.0.0
Severity: Keywords:
Cc: Has Test: no
Status: Pending Core Response Has Patch: no

Description

symfony has a echoln function so if doctrine's sfYaml is include first and then symfony sfYaml.class.php, the console output an error when executing : ./symfony doctrine:build-forms frontend

I post a quick patch, btw echoln is not used in doctrine code ...

Fatal error: Cannot redeclare echoln() 
(previously declared in /[...]/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Parser/sfYaml.php:108) 
in /Users/rande/Projects/3rd/sf1.1.1/lib/yaml/sfYaml.class.php on line 104

Index: sfYaml.php
===================================================================
--- sfYaml.php  (revision 4867)
+++ sfYaml.php  (working copy)
@@ -103,9 +103,8 @@
  * @param string The string to echo with new line
  */
 //I add a is_callable test to avoid redeclaration.
-if (!is_callable('echoln')){
-  function echoln($string)
-  {
-    echo $string."
";
-  }
-}
 No newline at end of file
+
+function doctrine_echoln($string)
+{
+  echo $string."
";
+}

Change History

Changed 10 months ago by rande

  • priority changed from minor to major
  • version changed from 0.11 to Trunk
  • component changed from Attributes to File Parser

Changed 10 months ago by anonymous

  • milestone New deleted

Milestone New deleted

Changed 10 months ago by jwage

  • version changed from Trunk to 1.0
  • milestone set to 1.0.3

Changed 10 months ago by jwage

  • status changed from new to closed
  • resolution set to fixed

(In [4959]) fixes #1413

Note: See TracTickets for help on using tickets.