]> git.mxchange.org Git - friendica-addons.git/commitdiff
Solves PHP warning "Use of undefined constant"
authorMichael <heluecht@pirati.ca>
Wed, 26 Dec 2018 11:00:36 +0000 (11:00 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 26 Dec 2018 11:00:36 +0000 (11:00 +0000)
jappixmini/jappixmini.php

index e2ef01d28b3f7c3a828840de59f40e6b5200ed98..0ef56aed650b1a99d0401a54a7200a0746e2ce43 100644 (file)
@@ -203,8 +203,8 @@ function jappixmini_init()
                        killme();
                }
 
-               $encrypt_func = openssl_public_encrypt;
-               $decrypt_func = openssl_public_decrypt;
+               $encrypt_func = 'openssl_public_encrypt';
+               $decrypt_func = 'openssl_public_decrypt';
                $key = $r[0]["pubkey"];
        } else if ($role == "prv") {
                $r = q("SELECT * FROM `contact` WHERE LENGTH(`prvkey`) AND `issued-id`='%s' LIMIT 1", DBA::escape($dfrn_id));
@@ -212,8 +212,8 @@ function jappixmini_init()
                        killme();
                }
 
-               $encrypt_func = openssl_private_encrypt;
-               $decrypt_func = openssl_private_decrypt;
+               $encrypt_func = 'openssl_private_encrypt';
+               $decrypt_func = 'openssl_private_decrypt';
                $key = $r[0]["prvkey"];
        } else {
                killme();
@@ -606,14 +606,14 @@ function jappixmini_cron(App $a, $d)
                        $dfrn_id = $contact_row["dfrn-id"];
                        if ($dfrn_id) {
                                $key = $contact_row["pubkey"];
-                               $encrypt_func = openssl_public_encrypt;
-                               $decrypt_func = openssl_public_decrypt;
+                               $encrypt_func = 'openssl_public_encrypt';
+                               $decrypt_func = 'openssl_public_decrypt';
                                $role = "prv";
                        } else {
                                $dfrn_id = $contact_row["issued-id"];
                                $key = $contact_row["prvkey"];
-                               $encrypt_func = openssl_private_encrypt;
-                               $decrypt_func = openssl_private_decrypt;
+                               $encrypt_func = 'openssl_private_encrypt';
+                               $decrypt_func = 'openssl_private_decrypt';
                                $role = "pub";
                        }