From c90b97cce22b9255f0df87b3d8faf80c9e41eb32 Mon Sep 17 00:00:00 2001 From: cschantz Date: Wed, 3 Dec 2025 01:10:04 -0500 Subject: [PATCH] Fix missing common-functions.sh dependency in php-optimizer.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: - Script showed errors: print_info: command not found, command_exists: command not found - system-detect.sh and other libraries depend on common-functions.sh - php-optimizer.sh was not sourcing common-functions.sh Fix: - Added common-functions.sh as first library to source - Reordered library loading: common-functions → system-detect → user-manager → php-detector → php-analyzer → php-config-manager Result: - All functions now available - Script loads without errors - Menu displays correctly --- modules/performance/php-optimizer.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/performance/php-optimizer.sh b/modules/performance/php-optimizer.sh index 5324405..26cdacc 100755 --- a/modules/performance/php-optimizer.sh +++ b/modules/performance/php-optimizer.sh @@ -5,11 +5,12 @@ # Source required libraries PHP_TOOLKIT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd ../.. && pwd)" +source "$PHP_TOOLKIT_DIR/lib/common-functions.sh" || { echo "ERROR: common-functions.sh not found"; exit 1; } +source "$PHP_TOOLKIT_DIR/lib/system-detect.sh" || { echo "ERROR: system-detect.sh not found"; exit 1; } +source "$PHP_TOOLKIT_DIR/lib/user-manager.sh" || { echo "ERROR: user-manager.sh not found"; exit 1; } source "$PHP_TOOLKIT_DIR/lib/php-detector.sh" || { echo "ERROR: php-detector.sh not found"; exit 1; } source "$PHP_TOOLKIT_DIR/lib/php-analyzer.sh" || { echo "ERROR: php-analyzer.sh not found"; exit 1; } source "$PHP_TOOLKIT_DIR/lib/php-config-manager.sh" || { echo "ERROR: php-config-manager.sh not found"; exit 1; } -source "$PHP_TOOLKIT_DIR/lib/system-detect.sh" || { echo "ERROR: system-detect.sh not found"; exit 1; } -source "$PHP_TOOLKIT_DIR/lib/user-manager.sh" || { echo "ERROR: user-manager.sh not found"; exit 1; } # Color codes (using safe echo -e) RED='\033[0;31m'