xy2z / capro

PHP8 static site generator
MIT License
8 stars 2 forks source link

Bug: `capro serve` bugs when having functions in config file #19

Open xy2z opened 1 year ago

xy2z commented 1 year ago
λ capro serve                                                                                                                                                                                                            
PHP Fatal error:  Cannot redeclare get_cats() (previously declared in .\capro-docs\config\core.php:5) in .\capro-docs\config\core.php on line 5        
» Capro development server started at http://127.0.0.1:82                                                                                                                                                                

Temporary fix, use if (!function_exists('foo')) { before each function...

If anyone has any idea on how to fix this, it's greatly appreciated :)


🎃 For more PHP hacktoberfest issues, see: https://github.com/search?q=owner%3Axy2z+label%3Ahacktoberfest+is%3Aopen&type=issues&s=comments&o=asc