Connections Business Directory
[resolved] [Plugin: Connections] No allowing particular shortcode combinations (3 posts)

  1. funkimunky
    Posted 4 years ago #

    I am using wordpress 3.2.1
    PHP Version 5.2.8
    on apache 2
    sme server 7
    I am unable to use to attributes together

    <?php connectionsEntryList( array( 'category_name'=>'Depute Head Teacher','category_in'=>'117','template'=>'staff-profile') )

    this always returns no results

    there are entries for this query.

    This works fine on PHP Version 5.3.5

    I have tracked it down to
    class.retrieve.php line 216
    if ( !empty($atts['id']) || !empty($entryIDs) ) $where[] = 'AND id IN (\'' . implode("', '", array_unique( array_merge( (array) $atts['id'], (array) $entryIDs ), SORT_NUMERIC) ) . '\')';

    The problem seems to be with function array_unique.
    if it is used with SORT_NUMERIC sort flat it always replaces array with null.
    If i remove the sort flag array_unique works fine.

    Its probably an incompatibility with the php version I have, but unfortunately I am tied to this version.

    just to clarify on my server
    $input = array(4, "4", "3", 4, 3, "3");
    $result = array_unique($input,SORT_NUMERIC);


  2. shazahm1
    Plugin Author

    Posted 4 years ago #

    Yes, that sort flag is incompatible with your version of PHP. I've removed it from the dev version so it will not be included in the next release.

  3. funkimunky
    Posted 4 years ago #

    Thanks for the notice on updates for this. I'll take it out of my current version.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Connections Business Directory
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic