I have something like this below. I wanna use a phrase for the body of the PM being sent, so I can change it around in the phrase. However when this job runs in the cron job I get this error:
Fatal error: Unable to proceed with save while $errors array is not empty in class vb_datamanager_pm in /includes/class_dm.php on line 758
Code:
$place = construct_phrase($vbphrase['ptp_alertpm'], $pquery['username']);
// Send a PM to user(s)
$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);
$pmdm->set('fromuserid', $vbulletin->options['ptp_fromuserid']);
$pmdm->set('fromusername', $vbulletin->options['ptp_fromusername']);
$pmdm->set('title', 'Crap');
$pmdm->set('message', $place);
$pmtousernames = implode(';', $pmto_users);
$pmdm->set_recipients($pmtousernames, $botpermissions);
$pmdm->set('dateline', TIMENOW);
$pmdm->save();
Any ideas? If I replace $place in the actual PM datamanager code above with 'text' the cron runs fine, so I know that is the issue