ID:               37210
 User updated by:  mattsch at gmail dot com
 Reported By:      mattsch at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Arrays related
 Operating System: Linux
 PHP Version:      5.1.2
 New Comment:

Sorry, this is bogus.  I know what I'm doing wrong.


Previous Comments:
------------------------------------------------------------------------

[2006-04-26 16:39:45] mattsch at gmail dot com

Description:
------------
array_multisort reports this warning on arrays in which the sizes are
consistent:

Warning: array_multisort() [function.array-multisort]: Array sizes are
inconsistent in /home/www/rootsite_staging/reports/index.php on line

Reproduce code:
---------------
<?php
$selectedReports = array (
  'file' =>
  array (
    0 => '/home/www/staging/reports/Daily
Reports/DMR/2006/04_April2006/20060417_DAY.xls',
    1 => '/home/www/staging/reports/Daily
Reports/Payroll/2006/04_April2006/20060417_DailyPayroll.xls',
    2 => '/home/www/staging/reports/Daily
Reports/DMR/2006/04_April2006/20060418_DAY.xls',
    3 => '/home/www/staging/reports/Daily
Reports/Payroll/2006/04_April2006/20060418_DailyPayroll.xls',
    4 => '/home/www/staging/reports/Daily
Reports/DMR/2006/04_April2006/20060419_DAY.xls',
    5 => '/home/www/staging/reports/Daily
Reports/Payroll/2006/04_April2006/20060419_DailyPayroll.xls',
    6 => '/home/www/staging/reports/Daily
Reports/DMR/2006/04_April2006/20060420_DAY.xls',
    7 => '/home/www/staging/reports/Daily
Reports/DMR/2006/04_April2006/20060420_DAY_r1.xls',
    8 => '/home/www/staging/reports/Daily
Reports/Payroll/2006/04_April2006/20060420_DailyPayroll.xls',
    9 => '/home/www/staging/reports/Daily
Reports/Payroll/2006/04_April2006/20060420_DailyPayroll_r1.xls',
    10 => '/home/www/staging/reports/Daily
Reports/DMR/2006/04_April2006/20060421_DAY.xls',
  ),
  'date' =>
  array (
    0 => '2006-04-17',
    1 => '2006-04-17',
    2 => '2006-04-18',
    3 => '2006-04-18',
    4 => '2006-04-19',
    5 => '2006-04-19',
    6 => '2006-04-20',
    7 => '2006-04-20',
    8 => '2006-04-20',
    9 => '2006-04-20',
    10 => '2006-04-21',
  ),
  'revision' =>
  array (
    0 => 0,
    1 => 0,
    2 => 0,
    3 => 0,
    4 => 0,
    5 => 0,
    6 => 0,
    7 => 1,
    8 => 0,
    9 => 1,
    10 => 0,
  ),
  'report' =>
  array (
    0 => 'Daily Manager Report',
    1 => 'Payroll Report',
    2 => 'Daily Manager Report',
    3 => 'Payroll Report',
    4 => 'Daily Manager Report',
    5 => 'Payroll Report',
    6 => 'Daily Manager Report',
    7 => 'Daily Manager Report',
    8 => 'Payroll Report',
    9 => 'Payroll Report',
    10 => 'Daily Manager Report',
  ),
);
array_multisort($selectedReports['date'], $selectedReports['report'],
$selectedReports['revision'], SORT_DESC, $selectedReports['file'],
$selectedReports);
?>

Expected result:
----------------
The size of each dimension dimension being sorted are consistent.  I've
checked it and rechecked it and even looped over it (no index error). It
should not report an inconsistent warning. 

Actual result:
--------------
Does not sort and reports an inconsistent size warning.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37210&edit=1

Reply via email to