mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-01-20 10:52:15 +01:00
Tiny fixes to silence PHP warnings from Hiroki Nose <Hiroki_Nose@totec.co.jp>.
1. PHP Notice: Use of undefined constant CURL_OK - assumed 'CURL_OK' in /usr/share/ykval/ykval-common.php on line 156 2. PHP Notice: Undefined index: HTTPS in /usr/share/ykval/ykval-verify.php on line 14 3. PHP Notice: Undefined variable: query in /usr/share/ykval/ykval-db.php on line 186
This commit is contained in:
parent
d65d031d0c
commit
a68539e884
@ -153,7 +153,7 @@ function retrieveURLasync ($urls, $ans_req=1, $match="^OK", $returl=False) {
|
||||
|
||||
while ($info = curl_multi_info_read($mh)) {
|
||||
debug ("YK-KSM multi", $info);
|
||||
if ($info['result'] == CURL_OK) {
|
||||
if ($info['result'] == CURLE_OK) {
|
||||
$str = curl_multi_getcontent($info['handle']);
|
||||
debug($str);
|
||||
if (preg_match("/".$match."/", $str)) {
|
||||
|
@ -181,7 +181,8 @@ class Db
|
||||
*/
|
||||
public function conditionalUpdateBy($table, $k, $v, $values, $condition)
|
||||
{
|
||||
|
||||
$query = ""; /* quiet the PHP Notice */
|
||||
|
||||
foreach ($values as $key=>$value){
|
||||
$query = $query . " " . $key . "='" . $value . "',";
|
||||
}
|
||||
@ -279,6 +280,8 @@ or false on failure.
|
||||
*/
|
||||
public function findByMultiple($table, $where, $nr=null, $rev=null, $distinct=null)
|
||||
{
|
||||
$value=""; /* quiet the PHP Notice */
|
||||
$match=null; /* quiet the PHP Notice */
|
||||
$query="SELECT";
|
||||
if ($distinct!=null) {
|
||||
$query.= " DISTINCT " . $distinct;
|
||||
|
@ -11,7 +11,7 @@ $myLog = new Log('ykval-verify');
|
||||
$myLog->addField('ip', $_SERVER['REMOTE_ADDR']);
|
||||
$myLog->log(LOG_INFO, "Request: " . $_SERVER['QUERY_STRING'] .
|
||||
" (at " . date("c") . " " . microtime() . ") " .
|
||||
($_SERVER["HTTPS"] == "on" ? "HTTPS" : "HTTP"));
|
||||
(isset($_SERVER["HTTPS"]) == TRUE ? ($_SERVER["HTTPS"] == "on" ? "HTTPS" : "HTTP") : "HTTP"));
|
||||
|
||||
/* Detect protocol version */
|
||||
if (preg_match("/\/wsapi\/([0-9]+)\.([0-9]+)\//", $_SERVER['REQUEST_URI'], $out)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user