Index: trunk/extensions/Lingo/LingoBasicBackend.php |
— | — | @@ -59,7 +59,7 @@ |
60 | 60 | wfProfileIn( __METHOD__ ); |
61 | 61 | |
62 | 62 | $ret = null; |
63 | | - static $term = null; |
| 63 | + $term = null; |
64 | 64 | static $definition = null; |
65 | 65 | |
66 | 66 | // find next valid line (yes, the assignation is intended) |
— | — | @@ -72,10 +72,10 @@ |
73 | 73 | $chunks = explode( ':', $entry[1], 2 ); |
74 | 74 | |
75 | 75 | // found a new term? |
76 | | - if ( $chunks[0] ) { |
| 76 | + if ( count( $chunks ) >= 1 && strlen( $chunks[0] ) >= 1 ) { |
77 | 77 | $term = trim( substr( $chunks[0], 1 ) ); |
78 | 78 | } |
79 | | - |
| 79 | + |
80 | 80 | // found a new definition? |
81 | 81 | if ( count ( $chunks ) == 2 ) { |
82 | 82 | $definition = trim( $chunks[1] ); |