From 29a0861780a925917747a1a4bf3bee4bf760d869 Mon Sep 17 00:00:00 2001 From: Frank Agerholm Date: Thu, 27 Dec 2018 16:25:15 +0100 Subject: [PATCH] default exception handler added, Client-Options for connections added --- retwis.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/retwis.php b/retwis.php index 3ae3fd2..b159712 100644 --- a/retwis.php +++ b/retwis.php @@ -1,6 +1,14 @@ getMessage(); + trigger_error($msg,E_USER_ERROR); +} + +set_exception_handler('exception_handler'); function getrand() { $fd = fopen("/dev/urandom","r"); @@ -37,9 +45,10 @@ function loadUserInfo($userid) { function redisLink() { static $r = false; + global $redis_options; if ($r) return $r; - $r = new Predis\Client(); + $r = new Predis\Client($redis_options); return $r; }