Minor - fixing PHP warnings

1.9.x
Julio Montoya 10 years ago
parent 4cc91ffd6e
commit 79ddabcfa0
  1. 9
      main/auth/inscription.php
  2. 5
      main/calendar/agenda_js.php
  3. 2
      main/document/showinframes.php

@ -412,17 +412,20 @@ if ($form->validate()) {
}
}
$status = isset($values['status']) ? $values['status'] : null;
$phone = isset($values['phone']) ? $values['phone'] : null;
// Creates a new user
$user_id = UserManager::create_user(
$values['firstname'],
$values['lastname'],
$values['status'],
$status,
$values['email'],
$values['username'],
$values['pass1'],
$values['official_code'],
$values['language'],
$values['phone'],
$phone,
null,
PLATFORM_AUTH_SOURCE,
null,
@ -593,7 +596,7 @@ if ($form->validate()) {
$_user['mail'] = $values['email'];
$_user['language'] = $values['language'];
$_user['user_id'] = $user_id;
$is_allowedCreateCourse = $values['status'] == 1;
$is_allowedCreateCourse = isset($values['status']) && $values['status'] == 1;
$usersCanCreateCourse = (api_get_setting('allow_users_to_create_courses') == 'true');
Session::write('_user', $_user);

@ -3,9 +3,7 @@
/**
* @package chamilo.calendar
*/
/**
* INIT SECTION
*/
use \ChamiloSession as Session;
// name of the language file that needs to be included
@ -21,7 +19,6 @@ $userId = isset($_REQUEST['user_id']) ? $_REQUEST['user_id'] : null;
if ($type == 'personal') {
$cidReset = true; // fixes #5162
}
require_once '../inc/global.inc.php';
require_once 'agenda.lib.php';
require_once 'agenda.inc.php';

@ -115,7 +115,7 @@ if (in_array(strtolower($pathinfo['extension']), $jplayer_supported_files)) {
$group_id = api_get_group_id();
$current_group = GroupManager::get_group_properties($group_id);
$current_group_name=$current_group['name'];
$current_group_name = $current_group['name'];
if (isset($group_id) && $group_id != '') {
$req_gid = '&gidReq='.$group_id;

Loading…
Cancel
Save