草庐IT

illegal_argument_exception

全部标签

php - Zend_Controller_Router_Exception : "xyz" is not specified

我当前的ZendFramework应用程序有问题。在我的Bootstrap中,我注册了这些路由:protectedfunction_initRouter(){$this->bootstrap("FrontController");$frontController=$this->getResource("FrontController");$route=newZend_Controller_Router_Route(":module/:id",array("controller"=>"index","action"=>"index"),array("id"=>"\d+"));$front

php - 在 Laravel Forge 上部署抛出 faker not found Exception

我正在尝试在forge上部署一个laravel项目,但出现以下异常:Symfony\Component\Debug\Exception\FatalErrorException]Class'Faker\Factory'notfound我在composer.json的require-dev中有faker引用!composer.json文件{"name":"laravel/laravel","description":"TheLaravelFramework.","keywords":["framework","laravel"],"license":"MIT","type":"projec

php - Laravel 4 迁移 : class not found exception

很明显,当我想迁移我的数据库时,我得到了这个奇怪的错误{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class''notfound","file":"C:\\xampp\\htdocs\\l4crm\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Migrations\\Migrator.php","line":301}}[Finishedin1.3s]过去当然一切正常,我尝试迁移哪些文件并不重

php - 通配符子域异常(exception)

我启用了通配符子域,并通过按原样将其传递到我的index.php(例如somecity.domain.com)来动态解析URL。现在,我希望创建一些静态的子域,我可以在其中安装不同的应用程序,而不是与我当前的应用程序混在一起(例如blog.domain.com)。我的.htaccess当前读取:RewriteEngineOnRewriteBase/RewriteCond%{REQUEST_FILENAME}!-fRewriteCond%{REQUEST_FILENAME}!-dRewriteRule./index.php[L]我可以操纵这个.htaccess来实现我需要的吗?可以通过A

php - 交响乐 2 : Authentication exception occurred

我有一个可以运行的symfony站点,它是为2.0.9版开发的。我尝试升级到最新版本(2.4.2),但现在每次我尝试访问登录页面时都会出现重定向循环。以下是日志内容:[2014-03-1612:39:10]security.INFO:Authenticationexceptionoccurred;redirectingtoauthenticationentrypoint(ATokenwasnotfoundintheSecurityContext.)[][]这是我的security.ymlsecurity:encoders:Starski\FrontBundle\Entity\User:

phpunit 从不抛出 "Argument #3 (No Value) of PHPUnit_TextUI_ResultPrinter::__construct() must be a value from "", "auto"或 "always""

我只是在测试Php单元。这是我的DependencyFailureTest类:require_once'../vendor/autoload.php';usePHPUnit\Framework\TestCase;classDependencyFailureTestextends\PHPUnit\Framework\TestCase{publicfunctiontestOne(){$this->assertTrue(false);}/***@dependstestOne*/publicfunctiontestTwo(){}}但是在运行命令phpunit--verboseDependenc

php - 刷新 token 上的 Firebase REST API INVALID_ARGUMENT

昨天我们开始遇到RESTAPI问题,尤其是刷新token方法:https://firebase.google.com/docs/reference/rest/auth/#section-refresh-tokencurl'https://securetoken.googleapis.com/v1/token?key=[API_KEY]'\-H'Content-Type:application/x-www-form-urlencoded'\--data'grant_type=refresh_token&refresh_token=[REFRESH_TOKEN]'我们使用文档中的curl示

PHP "Warning: Illegal offset type in ..."数组问题让我很困惑

我一直在努力弄清楚为什么我的阵列没有按预期工作。我使用的代码在功能上与下面的代码相同,但它在我的程序中默默地失败了,所以我使用相同类型的数据和语法编写了一个独立的测试用例,并得到了关于非法偏移类型的错误。Warning:Illegaloffsettypein\example.phponline12Warning:Illegaloffsettypein\example.phponline16那些具体指的是包含对“$questions[$question]”的引用的两行。array("たま","だま"),"訓読み: 立"=>array("たて","たち","たつ","たてる","だてる",

PHP 警告 : Illegal string offset

我是PHP新手。今天将PHP从5.3.3迁移到5.4.4版本(DebianSqueeze到DebianWheezy),在此之后,我从Apache日志中收到此错误:>PHP警告:xyz中的非法字符串偏移“phptype”行是:self::$conn[$dsn['phptype']]=$mdb2;我需要帮助来恢复系统。 最佳答案 正如评论中的一些人所说,做这样的事情可能会导致该错误。正如您在上面的示例中看到的那样,$a是一个字符串而不是数组。这意味着您无法使用key访问它(但是,如果您想获取字符串中的第3个字母,可以执行$a[2])。您

PHP:\Exception 或命名空间内的异常

我正在尝试处理我的api中的一些错误。但是我尝试了很多方法来执行完成所需的操作?在代码中,我使用了Exception,\Exception,另一个扩展到Exception的类,“use\Exception”。这些选项都不起作用。我需要做什么来执行block捕获?//PieceofsourceinthebeginoffilenamespaceBusiness\Notifiers\Webhook;use\Exception;classMyExceptionextends\Exception{}//Pieceofsourcefrommyclasstry{$products=$payment-