Title: implode arg needs array
Last modified: August 21, 2016

---

# implode arg needs array

 *  [smiro2000](https://wordpress.org/support/users/smiro2000/)
 * (@smiro2000)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/implode-arg-needs-array/)
 * **php warning**
 * > Warning: implode(): Invalid arguments passed in /wp-content/plugins/widget-
   > logic-by-path/widget_logic_by_path.php on line 84
 * **fix**
 *     ```
       $master_pattern = "/^" . implode($patterns, array("$|^")) . "$/i";
       ```
   
 * thanks for the plugin, hope this helps.
    [http://wordpress.org/plugins/widget-logic-by-path/](http://wordpress.org/plugins/widget-logic-by-path/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Mohan Chevuri](https://wordpress.org/support/users/mchev2/)
 * (@mchev2)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/implode-arg-needs-array/#post-4464438)
 * Thanks for catching it. PHP documentation has the below line.
 * > Note: [implode()](http://us1.php.net/function.implode) can, for historical 
   > reasons, accept its parameters in either order. For consistency with explode(),
   > however, it may be less confusing to use the documented order of arguments
 * That is why it is working without any issues on our setup. Which version of PHP
   do you have? As the note about _consistency_ says, I will think about changing
   the order in the next version.
 *  [makaaymv](https://wordpress.org/support/users/makaaymv/)
 * (@makaaymv)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/implode-arg-needs-array/#post-4464467)
 * The same problem:
    `Warning: implode() [function.implode]: Invalid arguments 
   passed in /home/panograf/povidom.net/www/wp-content/plugins/widget-logic-by-path/
   widget_logic_by_path.php on line 84` Version of PHP 5.3 – recomended by provider
   as a stable version, also have 5.2, 5.4, 5.5 (beta). Thanks.
 *  Plugin Author [Mohan Chevuri](https://wordpress.org/support/users/mchev2/)
 * (@mchev2)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/implode-arg-needs-array/#post-4464468)
 * I will release an update, but adding the below line should fix the warning.
 * In file “wp-content/plugins/widget-logic-by-path/widget_logic_by_path.php” add
   the below line right after the line “private function regex_check($values){“.
 * `$patterns = array();`
 *  [makaaymv](https://wordpress.org/support/users/makaaymv/)
 * (@makaaymv)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/implode-arg-needs-array/#post-4464470)
 * Thank You very much! Now all works perfectly!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘implode arg needs array’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/widget-logic-by-path.svg)
 * [Widget Logic by Path](https://wordpress.org/plugins/widget-logic-by-path/)
 * [Support Threads](https://wordpress.org/support/plugin/widget-logic-by-path/)
 * [Active Topics](https://wordpress.org/support/plugin/widget-logic-by-path/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/widget-logic-by-path/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/widget-logic-by-path/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [makaaymv](https://wordpress.org/support/users/makaaymv/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/implode-arg-needs-array/#post-4464470)
 * Status: not resolved