kestasjk / webDiplomacy

Play Diplomacy online
http://webdiplomacy.net/
GNU Affero General Public License v3.0
180 stars 113 forks source link

New install or update without SMS function #859

Open alexintour opened 1 year ago

alexintour commented 1 year ago

Bug report

Please give us a short description of the bug When updating from an old code, but also when installing completely from scratch (I guess), in the config.php file you can decide if a SMS sending system is active or not.

Expected behaviour

site working without SMS function

Actual behaviour

when entering user options, the file vendor/autoload.php is called, and since it is missing, the page is not loading

Steps to reproduce

enter in user options when the SMS supoprt is not present

in file lib/sms.php the file is called without checking if it exists or not. require_once('vendor/autoload.php'); use Twilio\Rest\Client;

but it should be like if(file_exists('vendor/autoload.php')) require_once 'vendor/autoload.php'; use Twilio\Rest\Client;