Arrow

Implode Error | Peter's Login Redirect | Forum

Back to the login redirect plugin page

Please consider registering
guest

Log In

Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Implode Error
May 10, 2010
11:03 am
SarahB
Guest

Hi Peter! First of all, thanks for making such a great plug-in, I have used it on a number of my sites already!

I am currently receiving the following error while trying to access the "Login Redirects" menu in the administrative area of my site.

PHP Warning: implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed in wp-contentpluginspeters-login-redirectwplogin_redirect.php on line 210

Line 210:

$exclude_users = "'" . implode($exclude, "','") . "'";

I have disabled all of the other plug-ins I have installed and I am still receiving the error.

I'm running WP Version 2.9.2.

Any suggestions on what I will need to do to get this running? Thanks in advance, I really appreciate your help!

~SarahB~

May 13, 2010
7:34 am
Peter
Admin
Forum Posts: 841
Offline

Try switching the order of the parameters passed to "implode":

$exclude_users = "'" . implode("','", $exclude) . "'";
May 13, 2010
8:17 am
SarahB
Guest

Peter said:

Try switching the order of the parameters passed to "implode":

$exclude_users = "'" . implode("','", $exclude) . "'";

Thanks for the response Peter, but unfortunately updating the parameters did not help. I am still receiving the same error that I have listed above. Any other ideas on what I can do to troubleshoot this error?

Thanks!

May 13, 2010
8:15 pm
Peter
Admin
Forum Posts: 841
Offline

I'm not sure, as there shouldn't be an inherent problem in the plugin around that, and even the implode function should accept those parameters in either order. Also, I cannot reproduce the problem.

Try doing a var_dump( $exclude ); before that line to see what is contained in the $exclude variable. It should be an array (whether empty or not).

August 12, 2010
9:22 pm
Baf
Guest

Have the same error. Wordpress 3.0 Russian. What can I do to use your plugin?

August 14, 2010
12:44 pm
Peter
Admin
Forum Posts: 841
Offline

Unfortunately, this mystery was never solved. Did you inspect the contents of that $exclude variable as noted above? Have you checked to see whether the login_redirects table was successfully created upon activating the plugin (if it wasn't, you might have to manually create it using the SQL in the plugin file)? Are you using a multi-site install or something other than a plain one-site install?

August 19, 2010
3:08 am
Baf
Guest

Hi!
In php im full noob, so I just comment this line of code

$exclude_users = "'" . implode($exclude, "','") . "'";

with

//

at the start and it worked!
Will it broke something in the future? =)

August 20, 2010
3:51 pm
Peter
Admin
Forum Posts: 841
Offline

In that particular case, it's mostly harmless, but I'm going to release an update to the plugin that should bypass the problem.