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 // Creates a new user
$user_id = UserManager::create_user( $user_id = UserManager::create_user(
$values['firstname'], $values['firstname'],
$values['lastname'], $values['lastname'],
$values['status'], $status,
$values['email'], $values['email'],
$values['username'], $values['username'],
$values['pass1'], $values['pass1'],
$values['official_code'], $values['official_code'],
$values['language'], $values['language'],
$values['phone'], $phone,
null, null,
PLATFORM_AUTH_SOURCE, PLATFORM_AUTH_SOURCE,
null, null,
@ -593,7 +596,7 @@ if ($form->validate()) {
$_user['mail'] = $values['email']; $_user['mail'] = $values['email'];
$_user['language'] = $values['language']; $_user['language'] = $values['language'];
$_user['user_id'] = $user_id; $_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'); $usersCanCreateCourse = (api_get_setting('allow_users_to_create_courses') == 'true');
Session::write('_user', $_user); Session::write('_user', $_user);

@ -3,9 +3,7 @@
/** /**
* @package chamilo.calendar * @package chamilo.calendar
*/ */
/**
* INIT SECTION
*/
use \ChamiloSession as Session; use \ChamiloSession as Session;
// name of the language file that needs to be included // 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') { if ($type == 'personal') {
$cidReset = true; // fixes #5162 $cidReset = true; // fixes #5162
} }
require_once '../inc/global.inc.php'; require_once '../inc/global.inc.php';
require_once 'agenda.lib.php'; require_once 'agenda.lib.php';
require_once 'agenda.inc.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(); $group_id = api_get_group_id();
$current_group = GroupManager::get_group_properties($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 != '') { if (isset($group_id) && $group_id != '') {
$req_gid = '&gidReq='.$group_id; $req_gid = '&gidReq='.$group_id;

Loading…
Cancel
Save