~ubuntu-branches/ubuntu/quantal/mediawiki/quantal

« back to all changes in this revision

Viewing changes to debian/patches/fix_warnings.patch

  • Committer: Package Import Robot
  • Author(s): Thorsten Glaser, Thorsten Glaser, Jonathan Wiltshire
  • Date: 2012-09-20 13:40:12 UTC
  • mfrom: (16.1.20 sid)
  • Revision ID: package-import@ubuntu.com-20120920134012-fbv87yohdi5b3svt
Tags: 1:1.19.2-1
[ Thorsten Glaser ]
* New upstream: security fixes for CVE-2012-4377, CVE-2012-4378,
  CVE-2012-4379, CVE-2012-4380, CVE-2012-4381, CVE-2012-4382
  (Closes: #686330)
* Prevent <table></table> without any <tr /> inside, globally
* Fix more cases of not checking $wgHtml5
* MW’s ID (XML) sanitiser is there for a reason, use it!
* Prevent <ul></ul> without any <li /> inside in MonoBook
* Fix invalid XHTML caused by code not honouring $wgHtml5
* Quell some PHP warnings from sloppy code
* Do the wfSuppressWarnings patch used with FusionForge right
* Add myself to Uploaders and quieten lintian a bit
* Do not replace patched jquery-tablesorter with unpatched one;
  unbreaks sortable tables (Closes: #687519)
* Update versioned Breaks against fusionforge and mw-extensions

[ Jonathan Wiltshire ]
* Add Recommends on mediawiki-extensions-base and php-wikidiff2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
$Id: fix_warnings.patch 379 2012-09-20 11:45:26Z tg $
 
2
 
 
3
Fix code:
 
4
• array_merge expects at least one argument
 
5
• apparently, checking for syntax with unserialize() needs an extra
 
6
 
 
7
--- a/includes/SkinTemplate.php
 
8
+++ b/includes/SkinTemplate.php
 
9
@@ -1808,7 +1808,7 @@ abstract class BaseTemplate extends Quic
 
10
                        }
 
11
                }
 
12
 
 
13
-               if ( $option == 'flat' ) {
 
14
+               if ( $option == 'flat' && $validFooterLinks ) {
 
15
                        // fold footerlinks into a single array using a bit of trickery
 
16
                        $validFooterLinks = call_user_func_array(
 
17
                                'array_merge',
 
18
--- a/includes/media/PNG.php
 
19
+++ b/includes/media/PNG.php
 
20
@@ -78,7 +78,7 @@ class PNGHandler extends BitmapHandler {
 
21
                }
 
22
 
 
23
                wfSuppressWarnings();
 
24
-               $data = unserialize( $metadata );
 
25
+               $data = @unserialize( $metadata );
 
26
                wfRestoreWarnings();
 
27
 
 
28
                if ( !$data || !is_array( $data ) ) {