mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 15:42:29 +01:00
Fix: Ensure string type for urlencode()
This commit is contained in:
@@ -96,7 +96,7 @@ restrictedArea($user, 'propal', $object->id, '', '', 'fk_soc', 'rowid', $isdraft
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$parameters = array('id'=>$id);
|
||||
$parameters = array('id' => $id);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
@@ -191,14 +191,14 @@ if ($object->id > 0) {
|
||||
$objthirdparty = $object;
|
||||
$objcon = new stdClass();
|
||||
|
||||
$out = '&origin='.urlencode($object->element.(property_exists($object, 'module') ? '@'.$object->module : '')).'&originid='.urlencode($object->id);
|
||||
$out = '&origin='.urlencode((string) ($object->element.(property_exists($object, 'module') ? '@'.$object->module : ''))).'&originid='.urlencode((string) ($object->id));
|
||||
$urlbacktopage = $_SERVER['PHP_SELF'].'?id='.$object->id;
|
||||
$out .= '&backtopage='.urlencode($urlbacktopage);
|
||||
$permok = $user->hasRight('agenda', 'myactions', 'create');
|
||||
if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) {
|
||||
//$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create';
|
||||
if (get_class($objthirdparty) == 'Societe') {
|
||||
$out .= '&socid='.urlencode($objthirdparty->id);
|
||||
$out .= '&socid='.urlencode((string) ($objthirdparty->id));
|
||||
}
|
||||
$out .= (!empty($objcon->id) ? '&contactid='.urlencode($objcon->id) : '');
|
||||
//$out.=$langs->trans("AddAnAction").' ';
|
||||
|
||||
Reference in New Issue
Block a user