Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001619 [Quercus] minor always 02-20-07 10:46 02-28-07 10:38
Reporter ferg View Status public  
Assigned To nam
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0001619: mediawiki null object
Description (rep by Alex Sharaz)

Mediawiki 1.9.2

When you try to perform a search on a media wiki page you get the following error message
 
/usr/web/commswiki/webapps/wiki/includes/SpecialSearch.php:324: Fatal Error: null: 'getText' is an unknown method.
 
From SpecialSearch.php
 
 
  function showHit( $result, $terms ) {
                $fname = 'SpecialSearch::showHit';
                wfProfileIn( $fname );
                global $wgUser, $wgContLang, $wgLang;
 
                $t = $result->getTitle();
                if( is_null( $t ) ) {
                        wfProfileOut( $fname );
                        return "<!-- Broken link in search result -->\n";
                }
                $sk =& $wgUser->getSkin();
 
                $contextlines = $wgUser->getOption( 'contextlines', 5 );
                $contextchars = $wgUser->getOption( 'contextchars', 50 );
 
                $link = $sk->makeKnownLinkObj( $t );
                $revision = Revision::newFromTitle( $t );
<!ŚLine 324 Ó
                $text = $revision->getText();
<!-- Ó
                $size = wfMsgExt( 'nbytes', array( 'parsemag', 'escape'),
                        $wgLang->formatNum( strlen( $text ) ) );
 
                $lines = explode( "\n", $text );
 
                $max = intval( $contextchars ) + 1;
                $pat1 = "/(.*)($terms)(.{0,$max})/i";
 
                $lineno = 0;
 
                $extract = '';
                wfProfileIn( "$fname-extract" );
                foreach ( $lines as $line ) {
                        if ( 0 == $contextlines ) {
                                break;
                        }
                        ++$lineno;
                        $m = array();
                        if ( ! preg_match( $pat1, $line, $m ) ) {
                                continue;
                        }
                        --$contextlines;
                        $pre = $wgContLang->truncate( $m[1], -$contextchars, '...' );
 
Additional Information
Attached Files

- Relationships

- Notes
(0001766)
nam
02-28-07 10:37

php/142t
 

- Issue History
Date Modified Username Field Change
02-20-07 10:46 ferg New Issue
02-28-07 10:35 nam Status new => assigned
02-28-07 10:35 nam Assigned To  => nam
02-28-07 10:37 nam Status assigned => closed
02-28-07 10:37 nam Note Added: 0001766
02-28-07 10:38 nam Resolution open => fixed
02-28-07 10:38 nam Fixed in Version  => 3.1.1


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker