Skip to content

Commit 726f2aa

Browse files
committed
Check if the function is declared before declaring it.
1 parent a4a5cd6 commit 726f2aa

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212
],
1313
"autoload": {
14-
"files": [ "src/functions.php" ]
14+
"files": [ "src/functions_include.php" ]
1515
},
1616
"require": {
1717
"php": ">=5.3",

src/functions_include.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace Clue\React\Block;
4+
5+
if (!function_exists('Clue\\React\\Block\\sleep')) {
6+
require __DIR__ . '/functions.php';
7+
}
8+

0 commit comments

Comments
 (0)