forked from Wavyzz/dolibarr
Fix arg to preg_replace() with cast
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -83,7 +84,7 @@ if (!$user->hasRight('projet', 'lire')) {
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$parameters = array('id'=>$socid);
|
||||
$parameters = array('id' => $socid);
|
||||
$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');
|
||||
@@ -129,7 +130,7 @@ print dol_get_fiche_head($head, 'agenda', $langs->trans("Project"), -1, ($object
|
||||
|
||||
if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) {
|
||||
$tmpurl = $_SESSION['pageforbacktolist']['project'];
|
||||
$tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl);
|
||||
$tmpurl = preg_replace('/__SOCID__/', (string) $object->socid, $tmpurl);
|
||||
$linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
} else {
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
Reference in New Issue
Block a user