PHP警告:array_shift()期望参数1为数组,在/home5/.../php/symfony/command/sfCommandManager.class.php中给定null [英] PHP warning: array_shift() expects parameter 1 to be array, null given in /home5/.../php/symfony/command/sfCommandManager.class.php

查看:144
本文介绍了PHP警告:array_shift()期望参数1为数组,在/home5/.../php/symfony/command/sfCommandManager.class.php中给定null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


array_shift()期望参数1为数组,在
/ home5 /.../ php / symfony / command / sfCommandManager.class.php

array_shift() expects parameter 1 to be array, null given in /home5/.../php/symfony/command/sfCommandManager.class.php

是我遇到的错误。

我正在尝试建立一个Symfony 1.4

I am trying to set up a Symfony 1.4 project using Bluehost, and I receive this error in the error log when I try to run symfony generate:project project name.

推荐答案

,当我使用Bluehost进行项目时,在尝试运行symfony generate:project项目名称时,我在错误日志中收到此错误。您需要给 array_shift()这个参数!看这个例子:

You need to give the array_shift() the parameter! Look this example:

$stack = array("orange", "banana", "apple", "raspberry");
$fruit = array_shift($stack); // Here you give the parameter
print_r($fruit);

您在 array_shift上输入 null 参数( ),您需要进行更改!

You give the null parameter on array_shift() and you need to change it!

更新:

array_shift()将数组的第一个值移开并返回它,将数组缩短一个元素并将所有内容向下移动。所有数字数组键都将修改为从零开始计数,而文字键不会被触摸。在此处阅读更多内容

array_shift() shifts the first value of the array off and returns it, shortening the array by one element and moving everything down. All numerical array keys will be modified to start counting from zero while literal keys won't be touched. Read here for more

这篇关于PHP警告:array_shift()期望参数1为数组,在/home5/.../php/symfony/command/sfCommandManager.class.php中给定null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆