I have copied a working ModX site to a testserver with XAmpp (Php 7.3) and MariaDb.
I upgraded it to 2.7.2.pl.
The site works Ok, but when I insert a record all the fields look well except for the blob field.
Step to reproduce
Code in snippet; called after a form post.
// Add request
$request = $modx->newObject('dbRequest');
{...}
$filename= $requestfile;
if (file_exists($filename))
$blob = file_get_contents($filename);
else
{
$blob = '';
}
$request->set('file',$blob);
$request->save(); // will save
Observed behavior
No errors.
The file exists on the server.
But content of blobfield is 1 byte and the content is “0”.
Expected behavior
The content of the file (like in the productionversion with php 5.6 and modx 2.6.x) in the database
Guess you’re using an as-of-yet unsupported phptype in the schema. Sounds like it’s worth reporting it in the xPDO GitHub repository to add that in a future release. Your fix could even be the basis for a proper pull request