-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yii2-redis,$redis->eval() error #16613
Labels
Comments
Can you update to the latest version, 2.0.6 is 3 years old! |
sorry,now 2.0.15.1 |
Do you still get an error with the latest version? |
yes,I wrote the wrong version number. |
Can I speak Chinese? |
Ok, do you know what version of the redis component you have? |
Issue moved to yiisoft/yii2-redis#159 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What steps will reproduce the problem?
$redis = \Yii::$app->redis;
$redis->eval($lua, array("data1", "date2", 1, 1,time()), 2);
What is the expected result?
Executed successfully
What do you get instead?
{
"name": "PHP Warning",
"message": "mb_strlen() expects parameter 1 to be string, array given",
"code": 2,
"type": "yii\base\ErrorException",
"file": "/vendor/yiisoft/yii2-redis/src/Connection.php",
"line": 677,
"stack-trace": [
"#0 [internal function]: yii\base\ErrorHandler->handleError(2, 'mb_strlen() exp...', '/vendor...', 677, Array)",
"#1 /vendor/yiisoft/yii2-redis/src/Connection.php(677): mb_strlen(Array, '8bit')",
"#2 /vendor/yiisoft/yii2-redis/src/Connection.php(630): yii\redis\Connection->executeCommand('EVAL', Array)",
"#3 /frontend/controllers/v1/MessageController.php(322): yii\redis\Connection->__call('eval', Array)",
"#4 /frontend/controllers/v1/MessageController.php(322): yii\redis\Connection->eval('\r\nlocal data...', Array, 4)",
"#5 [internal function]: frontend\controllers\v1\MessageController->actionOpen()",
"#6 /vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)",
"#7 /vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)",
"#8 /vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction('open', Array)",
"#9 /vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction('v1/message/open', Array)",
"#10 /vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request))",
"#11 /frontend/web/index.php(17): yii\base\Application->run()",
"#12 {main}"
]
}
Additional info
The text was updated successfully, but these errors were encountered: