https://bugzilla.wikimedia.org/show_bug.cgi?id=36089

       Web browser: ---
             Bug #: 36089
           Summary: SMW Exception Given namespace '2' is not an integer
           Product: MediaWiki extensions
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Semantic MediaWiki
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: s...@reedyboy.net
                CC: jeroen_ded...@yahoo.com, mar...@semantic-mediawiki.org
    Classification: Unclassified
   Mobile Platform: ---


[rakkaus] 2012-04-19 11:39:16 v22011026445052.yourvserver.net mediawiki-bw_:
/wiki/Translating:Waymarked_Trails   Exception from line 54 of
/www/w/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_WikiPage.php:
Given namespace '2' is not an integer.

Translate is getting a lot of these errors.

Looking through the code, there seems to be some suspicious entries (such as
SMW_DI_WikiPage.php), which is passing a float

return new SMWDIWikiPage( $parts[0], floatval( $parts[1] ), $parts[2] );


<?php

var_dump( is_integer( floatval( 1234 ) ) );
var_dump( is_integer( floatval( 1234.55 ) ) );

reedy@ubuntu64-web-esxi:~$ php test.php
bool(false)
bool(false)


So that code is going to throw errors.


It'd probably be saner if the constructor tried to make it an int if it isn't,
and then bail if it's still not useable

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to