[wp-trac] [WordPress Trac] #47071: Calling add_role() in a multi-site network causes a memory fatal error

WordPress Trac noreply at wordpress.org
Tue Apr 30 07:05:48 UTC 2019


#47071: Calling add_role() in a multi-site network causes a memory fatal error
--------------------------+------------------------------
 Reporter:  wahabmirjan   |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  5.1.1
 Severity:  critical      |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by thakkarhardik):

 Hi @wahabmirjan ,

 It looks like that you are getting the fatal error because of the name of
 the callback function you have provided in register_activation_hook() i.e.
 'add_role'. add_role() is a core wordpress function and you are using the
 same name for your callback function which causes the fatal error. Try
 changing the name of it and see if the issue still persists.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47071#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list