mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #14823
[Bug 1216453] Re: Warning when sending message to user
This might have been fixed by patch https://reviews.mahara.org/#/c/2621
Newer versions of php like to have objects created before adding things
to them.
So one can't do this:
$this->strings->urltext = (object) $def;
If $this->strings is not yet an object
so declaring it first
if (!is_object($this->strings)) {
$this->strings = new stdClass();
}
fixes the error
--
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/1216453
Title:
Warning when sending message to user
Status in Mahara ePortfolio:
Triaged
Bug description:
latest Mahara 1.8.0dev
This is a regression.
When I send a message to a user, I get the following warning after
sending the message:
[WAR] 11 (lib/activity.php:391) Creating default object from empty value
Call stack (most recent first):
log_message("Creating default object from empty value", 8, true, true, "/home/kristina/code/18stable/htdocs/lib/activity.p...", 391) at /home/kristina/code/18stable/htdocs/lib/errors.php:446
error(2, "Creating default object from empty value", "/home/kristina/code/18stable/htdocs/lib/activity.p...", 391, array(size 2)) at /home/kristina/code/18stable/htdocs/lib/activity.php:391
ActivityType->add_urltext(array(size 2)) at /home/kristina/code/18stable/htdocs/lib/activity.php:796
ActivityTypeUsermessage->__construct(object(stdClass), false) at /home/kristina/code/18stable/htdocs/lib/activity.php:77
handle_activity(object(stdClass), array(size 4)) at /home/kristina/code/18stable/htdocs/lib/activity.php:50
activity_occurred("usermessage", array(size 4)) at /home/kristina/code/18stable/htdocs/lib/user.php:1512
send_user_message(object(stdClass), "Hello Paula, Do you want to meet for lunch next w...", null) at /home/kristina/code/18stable/htdocs/user/sendmessage.php:117
sendmessage_submit(object(Pieform), array(size 4)) at Unknown:0
call_user_func_array("sendmessage_submit", array(size 2)) at /home/kristina/code/18stable/htdocs/lib/pieforms/pieform.php:528
Pieform->__construct(array(size 3)) at /home/kristina/code/18stable/htdocs/lib/pieforms/pieform.php:170
Pieform::process(array(size 3)) at /home/kristina/code/18stable/htdocs/lib/pieforms/pieform.php:71
pieform(array(size 3)) at /home/kristina/code/18stable/htdocs/user/sendmessage.php:105
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1216453/+subscriptions
References