-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP Fatal error #110
Comments
Hi @anonymous7002, Thanks for the report. After a first look, I don't reproduce the error, but I see something in the code that is a bit perilous and should be improved. Can you provide the exact command arguments leading to this error? It's will help with reproduction and writing unit tests. |
Do you try to compute a huge election without PDO/Sqlite extension installed? And using the -w (or --votes) argument? |
For clarification, I reproduced this issue in the command line program on two different Windows 10 64-bit PCs, and one Ubuntu WSL, by running this command: |
Can you activate PDO + SQLite extension in your php.ini file (or package with Ubuntu) and try again ? I have probably the perfect fix in a draft PR, but I want to be sure (and maybe do more refactoring). |
Fix #110 - Console Crash if file cache is deactivate (or Sqlite is not available)
I activated PDO + SQLite, and now it's working. |
Perfect. You will not need it (Sqlite) anymore in the next version (probably later this day). |
Version 4.2.1 published. |
I keep getting a fatal error whenever I run an election with the program:
PHP Fatal error: Uncaught TypeError: CondorcetPHP\Condorcet\Console\Commands\ElectionCommand::parseFromVotesArguments(): Argument #1 ($callBack) must be of type Closure, null given, called in C:\Users\Admin\Documents\Condorcet\vendor\julien-boudry\condorcet\src\Console\Commands\ElectionCommand.php on line 358 and defined in C:\Users\Admin\Documents\Condorcet\vendor\julien-boudry\condorcet\src\Console\Commands\ElectionCommand.php:716
Stack trace:
#0 C:\Users\Admin\Documents\Condorcet\vendor\julien-boudry\condorcet\src\Console\Commands\ElectionCommand.php(358): CondorcetPHP\Condorcet\Console\Commands\ElectionCommand->parseFromVotesArguments()
#1 C:\Users\Admin\Documents\Condorcet\vendor\julien-boudry\condorcet\src\Console\Commands\ElectionCommand.php(367): CondorcetPHP\Condorcet\Console\Commands\ElectionCommand->importInputsData()
#2 C:\Users\Admin\Documents\Condorcet\vendor\symfony\console\Command\Command.php(308): CondorcetPHP\Condorcet\Console\Commands\ElectionCommand->execute()
#3 C:\Users\Admin\Documents\Condorcet\vendor\symfony\console\Application.php(1014): Symfony\Component\Console\Command\Command->run()
#4 C:\Users\Admin\Documents\Condorcet\vendor\symfony\console\Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#5 C:\Users\Admin\Documents\Condorcet\vendor\symfony\console\Application.php(171): Symfony\Component\Console\Application->doRun()
#6 C:\Users\Admin\Documents\Condorcet\vendor\julien-boudry\condorcet\src\Console\CondorcetApplication.php(29): Symfony\Component\Console\Application->run()
#7 C:\Users\Admin\Documents\Condorcet\vendor\julien-boudry\condorcet\bin\condorcet.php(32): CondorcetPHP\Condorcet\Console\CondorcetApplication::run()
#8 C:\Users\Admin\Documents\Condorcet\vendor\julien-boudry\condorcet\bin\condorcet(3): require('...')
#9 C:\Users\Admin\Documents\Condorcet\vendor\bin\condorcet(120): include('...')
#10 {main}
thrown in C:\Users\Admin\Documents\Condorcet\vendor\julien-boudry\condorcet\src\Console\Commands\ElectionCommand.php on line 716
I've tried different PHP versions with no luck, and the first Condorcet version where this error occurs is 3.3.0.
The text was updated successfully, but these errors were encountered: