From e6196f69cdabd6173da1938ad85f340ae3dd9a06 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 18 May 2016 00:45:13 +0200 Subject: [PATCH] Fix Restler bug returning warnings --- dev/dolibarr_changes.txt | 13 ++++++++++--- .../framework/Luracast/Restler/AutoLoader.php | 3 +++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index a7aed128151..82f364b0c1f 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -116,8 +116,15 @@ JQUERYFILETREE: RESTLER: -------- - if ($className == 'Luracast\Restler\string') return; - if ($className == 'Luracast\Restler\mixed') return; - +* Add 2 lines into function + private function alias($className, $currentClass) + { + ... +to get + private function alias($className, $currentClass) + { + if ($className == 'Luracast\Restler\string') return; + if ($className == 'Luracast\Restler\mixed') return; + ... \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php b/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php index 8f2ec3bf339..c2e454346ee 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php @@ -307,6 +307,9 @@ class AutoLoader */ private function alias($className, $currentClass) { + if ($className == 'Luracast\Restler\string') return; + if ($className == 'Luracast\Restler\mixed') return; + if ($className != $currentClass && false !== strpos($className, $currentClass)) if (!class_exists($currentClass, false)