Reviewed:  https://reviews.mahara.org/8819
Committed: 
https://git.mahara.org/mahara/mahara/commit/7749c56167616c1d47019bfc7f3ca8c2c6860c8f
Submitter: Robert Lyon (robe...@catalyst.net.nz)
Branch:    17.10_STABLE

commit 7749c56167616c1d47019bfc7f3ca8c2c6860c8f
Author: Cecilia Vela Gurovic <cecili...@catalyst.net.nz>
Date:   Fri Apr 27 11:33:33 2018 +1200

Bug 1767220: fixed can_delete_wallpost parameter

When changing the code to create a anonymous function
the parameter for the can_delete_wallpost function
was wrongly left as the name of a variable inside a string
instead of the actual variable

behatnotneeded

Change-Id: I53d6f2154cce910efa655d8d244b3c56d9f9b990
(cherry picked from commit 7f45661d447e997a8d61bf97dc42e641f7fecbf6)

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask 
on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1767220

Title:
  Error when viewing a profile page with wall post as an Institution
  admin

Status in Mahara:
  Fix Committed
Status in Mahara 17.04 series:
  In Progress
Status in Mahara 17.10 series:
  Fix Committed
Status in Mahara 18.04 series:
  In Progress
Status in Mahara 18.10 series:
  Fix Committed

Bug description:
  To replicate

  Have a User1 belong to an Institution
  Go to profile page of the user and post a message in the wall
  Have User2 and set it as admin of the Institution
  Login as User2 and go to User1 profile page

  Expected result: You can see the User1's profile page

  Actual result: The error message is displayed

  [WAR] cf (auth/user.php:846) Invalid argument pass to is_admin_for_user method
  Call stack (most recent first):

      User->is_admin_for_user(" . intval($owner) .") at 
/home/ceciliavg/maharacode/mahara/htdocs/blocktype/wall/lib.php:324
      PluginBlocktypeWall::can_delete_wallpost("3", " . intval($owner) .") at 
/home/ceciliavg/maharacode/mahara/htdocs/blocktype/wall/lib.php:295
      PluginBlocktypeWall::{closure}(object(stdClass)) at Unknown:0
      array_map(object(Closure), array(size 3)) at 
/home/ceciliavg/maharacode/mahara/htdocs/blocktype/wall/lib.php:297
      PluginBlocktypeWall::fetch_posts(object(BlockInstance)) at 
/home/ceciliavg/maharacode/mahara/htdocs/blocktype/wall/lib.php:58
      PluginBlocktypeWall::render_instance(object(BlockInstance)) at 
/home/ceciliavg/maharacode/mahara/htdocs/lib/mahara.php:1809
      call_static_method("PluginBlocktypeWall", "render_instance", 
object(BlockInstance)) at 
/home/ceciliavg/maharacode/mahara/htdocs/blocktype/lib.php:1041
      BlockInstance->render_viewing(false) at 
/home/ceciliavg/maharacode/mahara/htdocs/lib/view.php:2133
      View->build_column(1, 2, false, false) at 
/home/ceciliavg/maharacode/mahara/htdocs/lib/view.php:2087
      View->build_columns(1, false, false) at 
/home/ceciliavg/maharacode/mahara/htdocs/lib/view.php:2072
      View->build_rows() at 
/home/ceciliavg/maharacode/mahara/htdocs/user/view.php:93

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1767220/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to