1 yettyn Oct 07, 2007 19:09
3 blueyed Nov 12, 2007 01:00
I've changed the fix, and added the check to the code which calls set_filters(); see http://evocms.cvs.sourceforge.net/evocms/b2evolution/blogs/inc/items/model/_itemlistlight.class.php?r1=1.10&r2=1.11
Thanks to Afwas for testing/debugging.
4 austriaco Nov 13, 2007 19:05
I just downloaded latest CVS and receive the same error in the backoffice post list:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /blogs/inc/items/model/_item.class.php on line 1820
5 blueyed Nov 13, 2007 20:04
That's another one, isn't it?
Just add "echo debug_get_backtrace();" there and then you'll see where it comes from, e.g.:
if( ! is_array( $whatever_is_argument_2_here ) )
{
echo debug_get_backtrace();
}
6 afwas Nov 14, 2007 01:28
Backtrace:
1. Item->get_edit_link( " ", " ", "<img src="http://www.blog.hemminga.net/rsc/icons/edit.gif" borde...", "#", "" )
File: /home/hemmi3/public_html/blog/inc/items/views/_item_list_table.view.php on line 188
I post it here just as a riminder to myself. This is the debug from
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /blogs/inc/items/model/_item.class.php on line 1820
7 afwas Nov 14, 2007 01:30
get_edit_link [line 1820]
void get_edit_link( [string $before = ' '], [string $after = ' '], [string $text = '#'], [string $title = '#'], [string $class = ''], [string $actionurl = '#'] )
Provide link to edit a post if user has edit rights
Parameters:
string $before: to display before link
string $after: to display after link
string $text: link text
string $title: link title
string $class: class name
string $actionurl: page url for the delete action
The original function in inc/items/views/_itms_list_table.views.php lines 180-194 are;
/**
* Edit Actions:
*
* @param Item
*/
function item_edit_actions( $Item )
{
// Display edit button if current user has the rights:
$r = $Item->get_edit_link( ' ', ' ', get_icon( 'edit' ), '#', '' );
// Display delete button if current user has the rights:
$r .= $Item->get_delete_link( ' ', ' ', get_icon( 'delete' ), '#', '', false );
return $r;
}
But I'm stuck here. The HEAD docs only gives;
get_edit_link [line 1796]
void get_edit_link( [ $params = array()] )
Provide link to edit a post if user has edit rights
Parameters:
$params:
so I'm having less $params than arguments from 1.10 and I don't know how to call them.
8 afwas Nov 14, 2007 06:59
A few hours sleep does wonders.
In ../blogs/inc/items/views/_item_list_table.view.php change lines 180 - 194:
/**
* Edit Actions:
*
* @param Item
*/
function item_edit_actions( $Item )
{
// Display edit button if current user has the rights:
$r = $Item->get_edit_link( ' ', ' ', get_icon( 'edit' ), '#', '' );
// Display delete button if current user has the rights:
$r .= $Item->get_delete_link( ' ', ' ', get_icon( 'delete' ), '#', '', false );
return $r;
}
in
/**
* Edit Actions:
*
* @param Item
*/
function item_edit_actions( $Item )
{
// Display edit button if current user has the rights:
$r = $Item->get_edit_link( array(
'before' => ' ',
'after' => ' ',
'text' => get_icon( 'edit' ),
'title' => '#',
'class' => '',
)
);
// Display delete button if current user has the rights:
$r .= $Item->get_delete_link( ' ', ' ', get_icon( 'delete' ), '#', '', false );
return $r;
}
and solved.
As blueyed stated: the answer was in the code LOL
Good luck
9 john Nov 14, 2007 11:38
Yes, thanks for that Afwas. What a relief )
10 laygnuk Nov 14, 2007 16:03
Hi,
I have exactly the same problem when i hit "Post / Comments" - the warning look like this :
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /inc/items/model/_item.class.php on line 1820
i'm using the latest beta, php5, apache2
11 afwas Nov 15, 2007 00:39
hi buzzworkers,
This is exactly the error we are talking about, so the solution works for you also ;)
Good luck
12 edb Nov 15, 2007 18:21
:D
13 blueyed Nov 16, 2007 00:57
Thanks, Afwas. Just committed to CVS.
(the same old API usage is in blogs/inc/items/views/_item_list_track.view.php, too - where I've applied the same patch)
Thanks. Committed to CVS HEAD.