Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Update to 4.0 app ERROR

for some reason when i updated the version on XAMPP to 4.0 my app is now giving me this error


object(BadMethodCallException)#41 (7) { ["message":protected]=> string(26) "Wrong number of parameters" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(32) "C:\xampp\htdocs\public\index.php" ["line":protected]=> int(19) ["trace":"Exception":private]=> array(1) { [0]=> array(6) { ["file"]=> string(32) "C:\xampp\htdocs\public\index.php" ["line"]=> int(19) ["function"]=> string(6) "handle" ["class"]=> string(23) "Phalcon\Mvc\Application" ["type"]=> string(2) "->" ["args"]=> array(0) { } } } ["previous":"Exception":private]=> NULL }

and this is my public/index.php


<?php

use Phalcon\Mvc\Application;

try {

    #   Include Composer
    require __DIR__ . '/../libraries/autoload.php';

    #   Include services
    require __DIR__ . '/../config/services.php';

    #   Handle the request
    $application = new Application($di);

    #   Include modules
    require __DIR__ . '/../config/modules.php';

    echo $application->handle()->getContent();
    // echo $application->handle()->getContent();

}
catch (Exception $e) {

  var_dump($e);die();

    if( $cf->server->debug )
    {
        echo $e->getMessage();
    }
    else
    {
        // header("Location: /error/ServerError");
    }

}


9.8k

Looks like you upgraded to Phalcon 4 as well. You need to downgrade to 3.4 or upgrade your application

what do i need to upgrade my app ?

Looks like you upgraded to Phalcon 4 as well. You need to downgrade to 3.4 or upgrade your application