php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #66810 GLOBAL: Throw SolrIllegalArgumentException instead of E_WARNING and E_ERROR
Submitted: 2014-03-03 00:50 UTC Modified: 2014-06-29 15:25 UTC
From: omars@php.net Assigned: omars (profile)
Status: Closed Package: solr (PECL)
PHP Version: Irrelevant OS: All
Private report: No CVE-ID: None
 [2014-03-03 00:50 UTC] omars@php.net
Description:
------------
When passing invalid parameters: Throw SolrIllegalArgumentException() instead of E_WARNING or E_ERROR globally in the whole extension.

Test script:
---------------
$query = new SolrQuery(new StdClass());

Expected result:
----------------
Fatal error: Uncaught exception 'SolrIllegalArgumentException' with message 'SolrQuery::__construct() expects parameter 1 to be string, object given'


Actual result:
--------------
Warning: SolrQuery::__construct() expects parameter 1 to be string, object given

Fatal error: SolrQuery::__construct(): Invalid query parameter

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-06-29 15:24 UTC] omars@php.net
-Assigned To: +Assigned To: omars
 [2014-06-29 15:25 UTC] omars@php.net
-Status: Assigned +Status: Closed
 [2014-06-29 15:25 UTC] omars@php.net
Fixed since 2.0.0, 1.1.0
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 12:01:27 2024 UTC