**Reported by durenor on 1 Jan 2008 05:41**
**Version:** 1.7.0
error can occurs in multiple places.
1. synchronizing "only directories" or directories that contains no images
2. disassociating all images from a category
**Steps to reproduce:** 1. goto Admin > Categories > Synchronize
2. create empty folders in galleries
2. choose "only directories"
3. uncheck "only perform a simulation"
**Additional information:** admin/include/functions.php at line: 600
600c600
## < if (isset($data[$key]) and $data[$key] != '')
> if (isset($data[$key]) and strlen($data[$key]) > 0)
[Piwigo Bugtracker #788](http://piwigo.org/bugs/view.php?id=788)
<!-- github-sync-id:97225449 -->
Please open a topic on forum
Steps to reproduce don't work... Synchro is perfectly running.
Your case is specific and can be solved on the forum.
Please add link here to the topic when done.
**Comment posted by VDigital on 1 Jan 2008 11:14**
Please open a topic on forum
Steps to reproduce don't work... Synchro is perfectly running.
Your case is specific and can be solved on the forum.
Please add link here to the topic when done.
<!-- github-comment-id:124890319 -->
interesting, i'm not sure why it did not work.
anyway, i made the changes in 'Additional Information' section, and it works.
**Comment posted by durenor on 2 Jan 2008 01:50**
interesting, i'm not sure why it did not work.
anyway, i made the changes in 'Additional Information' section, and it works.
<!-- github-comment-id:124890356 -->
$data[$key] != '' give a different response than
strlen($data[$key]) > 0
We must know it!
You will get a lot of errors elsewhere!
Not only within PhpWebGallery !!!
Please create a topic on our Forum anyway!
**Comment posted by VDigital on 2 Jan 2008 07:14**
If with php 5.2.5
$data[$key] != '' give a different response than
strlen($data[$key]) > 0
We must know it!
You will get a lot of errors elsewhere!
Not only within PhpWebGallery !!!
Please create a topic on our Forum anyway!
<!-- github-comment-id:124890379 -->
The best way to do the test is to use the strict comparator !== because it seems that with != PHP assume '0' as a null string....
if (isset($data[$key]) and $data[$key] !== '') {
for regressives problems, I thinks it's ok, but no regressives tests could be a good thing.
mass updates is used everywhere in synchronization, so tests have to be made.
**Comment posted by mathiasm on 29 Jan 2008 20:05**
From the forum: http://forum.phpwebgallery.net/viewtopic.php?id=12427
Grum said:
The best way to do the test is to use the strict comparator !== because it seems that with != PHP assume '0' as a null string....
if (isset($data[$key]) and $data[$key] !== '') {
for regressives problems, I thinks it's ok, but no regressives tests could be a good thing.
mass updates is used everywhere in synchronization, so tests have to be made.
<!-- github-comment-id:124890422 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Reported by durenor on 1 Jan 2008 05:41
Version: 1.7.0
error can occurs in multiple places.
Steps to reproduce: 1. goto Admin > Categories > Synchronize
2. create empty folders in galleries
2. choose "only directories"
3. uncheck "only perform a simulation"
Additional information: admin/include/functions.php at line: 600
600c600
< if (isset($data[$key]) and $data[$key] != '')
> if (isset($data[$key]) and strlen($data[$key]) > 0)
Piwigo Bugtracker #788
Comment posted by VDigital on 1 Jan 2008 11:14
Please open a topic on forum
Steps to reproduce don't work... Synchro is perfectly running.
Your case is specific and can be solved on the forum.
Please add link here to the topic when done.
Comment posted by durenor on 2 Jan 2008 01:50
interesting, i'm not sure why it did not work.
anyway, i made the changes in 'Additional Information' section, and it works.
Comment posted by VDigital on 2 Jan 2008 07:14
If with php 5.2.5
$data[$key] != '' give a different response than
strlen($data[$key]) > 0
We must know it!
You will get a lot of errors elsewhere!
Not only within PhpWebGallery !!!
Please create a topic on our Forum anyway!
Comment posted by mathiasm on 29 Jan 2008 20:05
From the forum: http://forum.phpwebgallery.net/viewtopic.php?id=12427
Grum said:
The best way to do the test is to use the strict comparator !== because it seems that with != PHP assume '0' as a null string....
if (isset($data[$key]) and $data[$key] !== '') {
for regressives problems, I thinks it's ok, but no regressives tests could be a good thing.
mass updates is used everywhere in synchronization, so tests have to be made.