You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
7.7.5: scoped plugin-update-checker fatals WP-CLI when the WordPress path isn't a literal prefix (e.g. ddev wp's /./) #155
In 7.7.5, every WP-CLI command crashes with a fatal error when the WordPress path isn't a literal prefix of the plugin path. Examples: wp --path=/var/www/html/./ …, which is what DDEV's ddev wp passes, a ../ in the path, or a plugin symlinked from outside the WordPress install. Version 7.6.7 works with the same path.
PHP Fatal error: Uncaught RuntimeException: The update checker cannot determine if "/var/www/html/wp-content/plugins/blockstudio/blockstudio.php" is a plugin or a theme. This is a bug. Please contact the PUC developer. in .../blockstudio/lib/yahnis-elsts/plugin-update-checker/Puc/v5p6/PucFactory.php:74
#0 .../blockstudio/includes/classes/github-updater.php(23): BlockstudioVendor\YahnisElsts\PluginUpdateChecker\v5p6\PucFactory::buildUpdateChecker()
#1 .../blockstudio/includes/class-plugin.php(339): Blockstudio\Github_Updater->__construct()
Web requests aren't affected in that setup, because there ABSPATH is a clean path.
Cause
PucFactory::isPluginFile() first checks whether the file path starts with WP_PLUGIN_DIR as a plain string. With ABSPATH = /var/www/html/./, WP_PLUGIN_DIR is /var/www/html/./wp-content/plugins. That string isn't a prefix of BLOCKSTUDIO_FILE (/var/www/html/wp-content/plugins/…), so PUC falls back to reading the plugin header. The scoper broke that fallback:
lib/yahnis-elsts/plugin-update-checker/Puc/v5p6/PucFactory.php:146 (same on main):
php-scoper prefixed the string inside function_exists(). get_file_data isn't covered by 'exclude-functions' => array( '/^wp_/' ) in scoper.inc.php. As a result the fallback can never run, and buildUpdateChecker() throws.
7.7.5, ./ path, line 146 changed to function_exists('get_file_data')
ok
7.6.7, ./ path
ok
Suggested fix
Add get_file_data to exclude-functions in scoper.inc.php, for example array( '/^wp_/', 'get_file_data' ). Another option is a patcher that undoes the prefix inside that function_exists() string. Normalising the path before buildUpdateChecker() would also avoid the crash, but the fallback would stay broken for symlinked installs.
Side note: the same prefixing turns function_exists('shell_exec') / function_exists('proc_open') in lib/symfony/console/Terminal.php into checks that are always false. That's only cosmetic, but it's the same root cause.
Workaround
Add a wp-cli.yml with path: /var/www/html, an absolute path with no ./, in the project root.
Fixed and released in Blockstudio 7.7.6. The scoped updater now recognizes the global WordPress functions it needs when falling back to plugin-header detection. Regression coverage verifies the built release ZIP through WP-CLI using clean paths, ./ and ../ path segments, and plugins symlinked from outside WordPress. The fix was integrated in c9521d2; the path and symlink regressions are in 83c1479. Full CI and distribution checks passed.
Activity
[ci] [all] Validate 7.7.6 updater paths and bundled UI fixes
dnnsjsk commentedon Oct 22, 2026
Fixed and released in Blockstudio 7.7.6. The scoped updater now recognizes the global WordPress functions it needs when falling back to plugin-header detection. Regression coverage verifies the built release ZIP through WP-CLI using clean paths, ./ and ../ path segments, and plugins symlinked from outside WordPress. The fix was integrated in c9521d2; the path and symlink regressions are in 83c1479. Full CI and distribution checks passed.