? Success

User tests: Successful: Unsuccessful:

avatar photodude
photodude
10 Jun 2016

Pull Request for Issue pg_set_client_encoding method does not exist in some postgresql extensions. HHVM is one example where the postgresql extension deviates from the typical Zend postgresql module php function set.

Summary of Changes

return -1 i.e. a failure when the pg_set_client_encoding method does not exist.

Testing Instructions

This is not easily testable unless you happen to have a postgresql module where the pg_set_client_encoding method does not exist.

Recommend to merge by code review.

avatar photodude photodude - open - 10 Jun 2016
avatar photodude photodude - change - 10 Jun 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Jun 2016
Labels Added: ?
avatar photodude photodude - change - 11 Jun 2016
The description was changed
avatar brianteeman brianteeman - change - 24 Jun 2016
Category Libraries Postgresql
avatar photodude
photodude - comment - 3 Jul 2016

@wilsonge please consider this for 3.6.1

avatar zero-24 zero-24 - test_item - 4 Jul 2016 - Tested successfully
avatar zero-24
zero-24 - comment - 4 Jul 2016

I have tested this item successfully on f631cb5

Looks good on Code review. Thanks.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10787.

avatar zero-24 zero-24 - change - 4 Jul 2016
Easy No Yes
avatar photodude
photodude - comment - 14 Jul 2016

@alikon would you review this PR?

avatar dgt41
dgt41 - comment - 14 Jul 2016

how about:

return  !function_exists('pg_set_client_encoding') ? -1 : pg_set_client_encoding($this->connection, 'UTF8');
avatar photodude
photodude - comment - 14 Jul 2016

@dgt41 using a Ternary Operator here is exactly the same. less lines of code, but questionable on if there is improved or reduced readability. I see it as more of a code style preference in this instance.

Either way will work, so it's a question of what will get this PR reviewed and merged.

avatar dgt41 dgt41 - test_item - 14 Jul 2016 - Tested successfully
avatar dgt41
dgt41 - comment - 14 Jul 2016

I have tested this item successfully on f631cb5

On code review!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10787.

avatar photodude
photodude - comment - 14 Jul 2016

Thanks @dgt41 and @zero-24 We are ready for RTC

avatar alikon
alikon - comment - 14 Jul 2016

@photodude unforunately i'don't have an HipHop VM with a postgresql installation,so i can only do a code review ....

p.s.
i'm not familiar with tests..... searching....
https://github.com/joomla/joomla-cms/blob/staging/tests/unit/suites/database/driver/postgresql/JDatabaseDriverPostgresqlTest.php#L1046

avatar photodude
photodude - comment - 14 Jul 2016

@alikon because this is not easily testable unless you happen to have a postgresql module where the pg_set_client_encoding method does not exist. I recommend to merge/test by code review. (well I guess you could test that it still functions normally with a standard postgresql module that does have the pg_set_client_encoding method, but that is done by travis in the automated testing)

I could try to find the two hhvm tests in my patch-8 branch that showed this failure and the fix resolving the issue.

We now have 2 successful code reviews needed for RTC

avatar photodude
photodude - comment - 15 Jul 2016

@wilsonge Can this be marked RTC?

avatar photodude
photodude - comment - 16 Jul 2016

@roland-d Here is another to consider for 3.6.1

avatar roland-d roland-d - change - 16 Jul 2016
Milestone Added:
avatar roland-d roland-d - close - 16 Jul 2016
avatar roland-d roland-d - merge - 16 Jul 2016
avatar roland-d roland-d - reference | 14ed7d8 - 16 Jul 16
avatar roland-d roland-d - merge - 16 Jul 2016
avatar roland-d roland-d - close - 16 Jul 2016
avatar roland-d roland-d - change - 16 Jul 2016
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-07-16 17:44:37
Closed_By roland-d
avatar roland-d
roland-d - comment - 16 Jul 2016

Merged on review because this function isn't used in the code, only used in a test class.

avatar photodude
photodude - comment - 16 Jul 2016

Thanks @roland-d

avatar photodude photodude - head_ref_deleted - 16 Jul 2016

Add a Comment

Login with GitHub to post a comment