[wp-trac] [WordPress Trac] #56738: Use require_once instead of require to load block files

WordPress Trac noreply at wordpress.org
Wed Oct 5 14:04:43 UTC 2022


#56738: Use require_once instead of require to load block files
--------------------------+-----------------------------
 Reporter:  aristath      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 In `sync-stable-blocks.js` we're compiling the contents of the `require-
 dynamic-blocks.php` file.
 When doing that, we currently use `require` instead of `require_once` to
 load the block files.

 We should change that in our sync script, in the context of loading files
 like that `require_once` makes more sense.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56738>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list