Hi @dwgebler
I have a weird issue,
I save encrypted data, in 2 tables, related by ID
when fetching the rows individually, without JOIN, and decrypting data, it works
when, JOIN the two tables, and decrypt the main row, it decrypt well,
but when, decrypting the joined rows, it does not !!!
when I copy past the row field data, and decrypt it, it decrypt, but when decrypt it in loop it does not
// this works
$appArr = $appsCollection->findOneBy([
"_sts" => 1,
]);
$app = $appArr->toArray();
$app["api_id"] = decryptData($app["api_id"]);
echo "<pre>";
print_r($app);
echo "</pre>";
// this works partially !!!
foreach($merchantCollection->where('__id', '!=', "")->join($appsCollection, "merchant_hid","_hid")->fetch() as $merchantArr) {
$merchant2 = $merchantArr->toArray();
$merchant2["merchant_user2"] = decryptData($merchant2["merchant_user2"]); // this works well
foreach ($merchant2["apps"] as $key => $value) {
$merchant2["apps"][$key]["api_id"] = decryptData($value["api_id"]); // this does not work
}
echo "<pre>";
print_r($merchant2);
echo "</pre>";
}