Ticket #1413 (closed defect: fixed)
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
Note: See
TracTickets for help on using
tickets.