mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 09:05:56 +00:00
Fix: Search error on autoregistered entities
Error: [Warning] array_combine() [function.array-combine]: Both parameters should have at least 1 element HandleRequest for submitted forms returns before the automatic registration of modules is performed, so no entities can be found. Fixed by moving DocumentationService::load_automatic_registration(); to the top of the function
This commit is contained in:
parent
88660f12f5
commit
5d9feb3fe5
@ -158,6 +158,8 @@ class DocumentationViewer extends Controller {
|
|||||||
* @return SS_HTTPResponse
|
* @return SS_HTTPResponse
|
||||||
*/
|
*/
|
||||||
public function handleRequest(SS_HTTPRequest $request, DataModel $model) {
|
public function handleRequest(SS_HTTPRequest $request, DataModel $model) {
|
||||||
|
DocumentationService::load_automatic_registration();
|
||||||
|
|
||||||
// if we submitted a form, let that pass
|
// if we submitted a form, let that pass
|
||||||
if(!$request->isGET() || isset($_GET['action_results'])) {
|
if(!$request->isGET() || isset($_GET['action_results'])) {
|
||||||
return parent::handleRequest($request, $model);
|
return parent::handleRequest($request, $model);
|
||||||
@ -168,7 +170,6 @@ class DocumentationViewer extends Controller {
|
|||||||
$thirdParam = $request->shift();
|
$thirdParam = $request->shift();
|
||||||
|
|
||||||
$this->Remaining = $request->shift(10);
|
$this->Remaining = $request->shift(10);
|
||||||
DocumentationService::load_automatic_registration();
|
|
||||||
|
|
||||||
// if no params passed at all then it's the homepage
|
// if no params passed at all then it's the homepage
|
||||||
if(!$firstParam && !$secondParam && !$thirdParam) {
|
if(!$firstParam && !$secondParam && !$thirdParam) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user