Commit 34fb8448 authored by Alexandre Delaunay's avatar Alexandre Delaunay Committed by Johan Cwiklinski

fix warnings in generate_bigdump (#3713)

add faker
parent 7c806887
......@@ -41,7 +41,8 @@
"patchwork/jsqueeze": "^2.0",
"atoum/atoum": "^3.3",
"atoum/telemetry-extension": "^1.0",
"sensiolabs/security-checker": "^4.1"
"sensiolabs/security-checker": "^4.1",
"fzaninotto/Faker": "^1.7"
},
"suggest": {
"ext-ldap": "Used ot provide LDAP authentication and synchronization",
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "cb5a37572a8b6fd0941951a1845bc8f2",
"content-hash": "2cc7a6fc25f687885458e5a5077a8be7",
"packages": [
{
"name": "container-interop/container-interop",
......@@ -1845,6 +1845,56 @@
],
"time": "2017-01-20T21:14:22+00:00"
},
{
"name": "fzaninotto/faker",
"version": "v1.7.1",
"source": {
"type": "git",
"url": "https://github.com/fzaninotto/Faker.git",
"reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d3ed4cc37051c1ca52d22d76b437d14809fc7e0d",
"reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d",
"shasum": ""
},
"require": {
"php": "^5.3.3 || ^7.0"
},
"require-dev": {
"ext-intl": "*",
"phpunit/phpunit": "^4.0 || ^5.0",
"squizlabs/php_codesniffer": "^1.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.8-dev"
}
},
"autoload": {
"psr-4": {
"Faker\\": "src/Faker/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "François Zaninotto"
}
],
"description": "Faker is a PHP library that generates fake data for you.",
"keywords": [
"data",
"faker",
"fixtures"
],
"time": "2017-08-15T16:48:10+00:00"
},
{
"name": "glpi-project/coding-standard",
"version": "0.7",
......
......@@ -970,7 +970,8 @@ class IPAddress extends CommonDBChild {
// To normalise the address, just make new one
$ipaddress = new self($ipaddress);
if ((count($this->binary) != 4)
if (!is_array($this->binary)
|| (count($this->binary) != 4)
|| (count($ipaddress->binary) != 4)
|| ($this->version != $ipaddress->version)) {
return false;
......
......@@ -395,7 +395,7 @@ class State extends CommonTreeDropdown {
$has_changed = false;
$where = [];
foreach ($unicity_fields as $unicity_field) {
if ($input[$unicity_field] != $this->fields[$unicity_field]) {
if (!isset($this->fields[$unicity_field]) || $input[$unicity_field] != $this->fields[$unicity_field]) {
$has_changed = true;
}
$where[$unicity_field] = $input[$unicity_field];
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -182,8 +182,6 @@ $vlan_loc = [];
generateGlobalDropdowns();
DBmysql::optimize_tables();
// Force entity right
$_SESSION['glpiactive_profile']['entity'] = 127;
......@@ -216,6 +214,5 @@ for ($i=0; $i<max(1, pow($entity_number, 1/2))&&$added<$entity_number; $i++) {
}
}
DBmysql::optimize_tables();
// clean messages;
$_SESSION["MESSAGE_AFTER_REDIRECT"]= [];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment