Jump to content

PHP Deprecated: implode(): Passing glue string after array is deprecated


Recommended Posts

Hi,

Who can help me make these code working whitout warnings? It is a file from Redis PHP Rescue

PHP Deprecated: implode(): Passing glue string after array is deprecated. Swap the parameters in /public_html/vendor/chrisboulton/php-resque/lib/Redisent/Redisent.php on line 73

Here is the code

/* Build the Redis unified protocol command */
array_unshift($args, strtoupper($name));
$command = sprintf('*%d%s%s%s', count($args), CRLF, implode(array_map(array($this, 'formatArgument'), $args), CRLF), CRLF);

Kind regards

Link to comment
Share on other sites

I understand, but unfortunatly i am not yet good in the lanquage.

So would it simply be as this?
implode(array_map(array($this, 'formatArgument'), $args), CRLF), CRLF);

Changed to?
$args), implode(array_map(array($this, 'formatArgument');

Or

$args), , CRLF), CRLF), implode(array_map(array($this, 'formatArgument'), CRLF), CRLF);

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.