fix undeclared variables or wrong variable names (/src)

This commit is contained in:
rabuzarus 2018-02-12 16:08:28 +01:00
parent 7e15a9f0f5
commit 342b9af734
8 changed files with 15 additions and 7 deletions

View file

@ -90,12 +90,12 @@ class DateTimeFormat
{
// Defaults to UTC if nothing is set, but throws an exception if set to empty string.
// Provide some sane defaults regardless.
if ($from === '') {
$from = 'UTC';
if ($tz_from === '') {
$tz_from = 'UTC';
}
if ($to === '') {
$to = 'UTC';
if ($tz_to === '') {
$tz_to = 'UTC';
}
if (($s === '') || (!is_string($s))) {

View file

@ -370,6 +370,9 @@ class Network
if ($http_code == 301 || $http_code == 302 || $http_code == 303 || $http_code == 307) {
$matches = [];
$new_location_info = @parse_url($curl_info['redirect_url']);
$old_location_info = @parse_url($curl_info['url']);
preg_match('/(Location:|URI:)(.*?)\n/', $header, $matches);
$newurl = trim(array_pop($matches));

View file

@ -127,6 +127,8 @@ class Temporal
*/
public static function getDateofBirthField($dob)
{
$a = get_app();
list($year, $month, $day) = sscanf($dob, '%4d-%2d-%2d');
if ($dob < '0000-01-01') {