What potential pitfalls should PHP developers be aware of when making changes to pre-existing scripts like osCommerce?

When making changes to pre-existing scripts like osCommerce, PHP developers should be aware of potential compatibility issues with other parts of the codebase, unintended consequences on functionality, and security vulnerabilities that may arise. It is important to thoroughly test any changes before deploying them to ensure they do not negatively impact the overall system.

// Example code snippet to check for compatibility issues before making changes
if (function_exists('some_function_name')) {
    // Proceed with making changes
} else {
    // Handle compatibility issue gracefully
    echo 'This function is not available in the current environment.';
}