Skip to content

Instantly share code, notes, and snippets.

@orthagh
Created December 8, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orthagh/85ed5f45a0722b4f2bd1 to your computer and use it in GitHub Desktop.
Save orthagh/85ed5f45a0722b4f2bd1 to your computer and use it in GitHub Desktop.
force getempty on create
diff --git a/inc/commondbtm.class.php b/inc/commondbtm.class.php
index 492dcb7..b1bfdf9 100644
--- a/inc/commondbtm.class.php
+++ b/inc/commondbtm.class.php
@@ -2330,10 +2330,8 @@ class CommonDBTM extends CommonGLPI {
// Create process
if ($this->isNewID($ID)) {
- if (!isset($this->fields['id'])) {
- // Only once
- $this->getEmpty();
- }
+ // Only once
+ $this->getEmpty();
if (is_array($input)) {
$input = $this->addNeededInfoToInput($input);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment