Fix missing common-functions.sh dependency in php-optimizer.sh
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
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user