2
0
forked from Wavyzz/dolibarr

Fix PHP 7.1

This commit is contained in:
Laurent Destailleur
2017-01-16 10:15:57 +01:00
parent f36dea5be7
commit d2b766f9f4
5 changed files with 11 additions and 10 deletions

View File

@@ -12,7 +12,7 @@ php:
- '5.5' - '5.5'
- '5.6' - '5.6'
- '7.0' - '7.0'
#- '7.1' - '7.1'
- nightly - nightly
addons: addons:

View File

@@ -151,7 +151,8 @@ Dolibarr better:
no more required, were also removed. Use this new one if you were using one of them. no more required, were also removed. Use this new one if you were using one of them.
- The trigger that activate or close a contract line is run on a contract line, not on contract. - The trigger that activate or close a contract line is run on a contract line, not on contract.
Dolibarr 5.0 was frozen before PHP 7.1 was released. It is compatible with PHP 5.3 to 7.0 but not with PHP 7.1 (Dolibarr 6.0 will be). Dolibarr 5.0 was frozen before PHP 7.1 was released. Unit tests are successful on PHP 7.1 but we don't have enough
feedback to confirm all application is compatible. Current officiel supported PHP versions are PHP 5.3 to 7.0.
***** ChangeLog for 4.0.3 to 4.0.2 ***** ***** ChangeLog for 4.0.3 to 4.0.2 *****

View File

@@ -1090,9 +1090,9 @@ if (($action == 'create') || ($action == 'adduserldap'))
// Categories // Categories
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
{ {
print '<tr><td>' . fieldLabel( 'Categories', 'usercats' ) . '</td><td colspan="3">'; print '<tr><td>' . fieldLabel('Categories', 'usercats') . '</td><td colspan="3">';
$cate_arbo = $form->select_all_categories( Categorie::TYPE_USER, null, 'parent', null, null, 1 ); $cate_arbo = $form->select_all_categories('user', null, 'parent', null, null, 1);
print $form->multiselectarray( 'usercats', $cate_arbo, GETPOST( 'usercats', 'array' ), null, null, null, print $form->multiselectarray('usercats', $cate_arbo, GETPOST('usercats', 'array'), null, null, null,
null, '90%' ); null, '90%' );
print "</td></tr>"; print "</td></tr>";
} }

View File

@@ -330,7 +330,7 @@ class User extends CommonObject
} }
else else
{ {
$this->error=$this->db->error(); $this->error=$this->db->lasterror();
return -1; return -1;
} }

View File

@@ -154,7 +154,7 @@ class WebservicesUserTest extends PHPUnit_Framework_TestCase
// Test URL // Test URL
$result=''; $result='';
$parameters = array('authentication'=>$authentication,'ref'=>'admin'); $parameters = array('authentication'=>$authentication,'id'=>0,'ref'=>'admin');
print __METHOD__."Call method ".$WS_METHOD."\n"; print __METHOD__."Call method ".$WS_METHOD."\n";
try { try {
$result = $soapclient->call($WS_METHOD,$parameters,$ns,''); $result = $soapclient->call($WS_METHOD,$parameters,$ns,'');
@@ -177,11 +177,11 @@ class WebservicesUserTest extends PHPUnit_Framework_TestCase
} }
print __METHOD__." result=".$result."\n"; print __METHOD__." result=".$result."\n";
$this->assertEquals('OK',$result['result']['result_code']); $this->assertEquals('OK', $result['result']['result_code'], 'Test on ref admin');
// Test URL // Test URL
$result=''; $result='';
$parameters = array('authentication'=>$authentication,'ref'=>'refthatdoesnotexists'); $parameters = array('authentication'=>$authentication,'id'=>0,'ref'=>'refthatdoesnotexists');
print __METHOD__."Call method ".$WS_METHOD."\n"; print __METHOD__."Call method ".$WS_METHOD."\n";
try { try {
$result = $soapclient->call($WS_METHOD,$parameters,$ns,''); $result = $soapclient->call($WS_METHOD,$parameters,$ns,'');
@@ -200,7 +200,7 @@ class WebservicesUserTest extends PHPUnit_Framework_TestCase
} }
print __METHOD__." result=".$result."\n"; print __METHOD__." result=".$result."\n";
$this->assertEquals('NOT_FOUND',$result['result']['result_code']); $this->assertEquals('NOT_FOUND', $result['result']['result_code'], 'Test on ref that does not exists');
return $result; return $result;
} }