|
Bob Morales posted:What are some common ways to refactor poo poo like this? Imagine functions.php with 500 functions just like this rt4 posted:Create an Employee class with an isActive() method that gets populated from the start when you load it from an EmployeeStorage interface via the GetById(int) method. You'll implement this interface several times over with a SQL version sitting at the bottom, then several decorators on top to handle things like validation and caching.
|
# ¿ May 18, 2021 17:00 |
|
|
# ¿ May 21, 2024 04:29 |
|
Thank you both! An immediate solution is great, this application just needs triage until it can be replaced in a few months.
|
# ¿ May 18, 2021 21:50 |
|
3rd edit: OK, maybe I understand enough now to try part 2 again. (Caveat: I've never worked with Wordpress.) I'm guessing that you're using the Checkbox ACF field type for artist mediums/locations? ACF saves checkbox values as serialized arrays, and I found this article helpful to visualize why that creates problems with querying. Since checkbox fields need to be queried using LIKE, searching for multiple selections in a checkbox should be doable by chaining single-term LIKE criteria with AND/OR. (i.e. wrapping individual key/value/compare arrays inside an array with the right relation set on the wrapper.) I took a whack at a function that'll generate a chaining structure that WP_USER_QUERY should be able to parse, for whatever fields you want to multi-filter on, using similar syntax. Lemme know if it works! I unfortunately have no Wordpress install to test against. PHP code:
|
# ¿ May 26, 2021 04:06 |
|
Glad it helped! Did you ever figure out part one? I couldn't tell if that was an artifact of problems with part two, or something separate. edit: btw, if you're still looking for help on the port, I sent you an email. handle fucked around with this message at 18:19 on May 26, 2021 |
# ¿ May 26, 2021 16:39 |
|
Any idea what the ODBC driver version is? yitam's comment on GitHub suggests that the visible error message may be a result of ARM64 not being included as a processor type in the driver code, but as part of a code path that's intending to warn about ODBC not being installed.
|
# ¿ Sep 4, 2021 18:14 |
|
|
# ¿ May 21, 2024 04:29 |
|
(Shooting from the hip here, not Windows-knowledgable. You may have already found these resources.) Seems to be an issue with the cURL library in PHP, not the AWS SDK (similar issue.) I don't think you need to worry about setting a value for CApath. Based on the libcurl error page, I'd check if PHP has permissions to read cacert.pem. Beyond that, another similar error was fixed by updating curl/openssl entries in php.ini to reflect the location of cacert.pem.
|
# ¿ Mar 29, 2022 00:16 |